6 declare(strict_types=1);
34 $this->source = $this->getMockBuilder(SourceProviderInterface::class)
35 ->disableOriginalConstructor()
36 ->setMethods([
'joinAttribute'])
37 ->getMockForAbstractClass();
41 $this->subject =
$objectManager->getObject(AttributeHandler::class);
48 'name' =>
'is_approved',
49 'origin' =>
'is_approved',
50 'type' =>
'searchable',
51 'dataType' =>
'varchar',
52 'entity' =>
'customer',
56 $this->source->expects($this->once())
57 ->method(
'joinAttribute')
60 $fieldInfo[
'entity'] .
'/' . $fieldInfo[
'origin'],
67 $this->subject->prepareSql($this->source,
$alias, $fieldInfo);
74 'name' =>
'is_approved',
75 'origin' =>
'is_approved',
76 'type' =>
'searchable',
77 'dataType' =>
'varchar',
78 'entity' =>
'customer',
80 $this->source->expects($this->once())
81 ->method(
'addFieldToSelect')
82 ->with(
'is_approved',
'left');
84 $this->subject->prepareSql($this->source,
$alias, $fieldInfo);
testPrepareSqlWithoutBind()
testPrepareSqlWithBindAndExistingJoinAttributeMethod()