1 | <?php |
||||
2 | |||||
3 | class SupplierControllerTest extends AimeosTestAbstract |
||||
4 | { |
||||
5 | public function testDetailAction() |
||||
6 | { |
||||
7 | View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
||||
8 | |||||
9 | $context = app( 'aimeos.context' )->get( true ); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
10 | $item = \Aimeos\Controller\Frontend::create( $context, 'supplier' )->slice( 0, 1 )->search()->first(); |
||||
0 ignored issues
–
show
The method
slice() does not exist on Aimeos\Controller\Frontend\Iface . It seems like you code against a sub-type of said class. However, the method does not exist in Aimeos\Controller\Frontend\Common\Iface or Aimeos\Controller\Frontend\Common\Decorator\Iface . Are you sure you never get one of those?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
11 | $params = ['site' => 'unittest', 's_name' => 'Test supplier', 'f_supid' => $item->getId()]; |
||||
12 | |||||
13 | $response = $this->action( 'GET', '\Aimeos\Shop\Controller\SupplierController@detailAction', $params ); |
||||
14 | |||||
15 | $this->assertResponseOk(); |
||||
16 | $this->assertStringContainsString( '<div class="section aimeos supplier-detail', $response->getContent() ); |
||||
17 | $this->assertStringContainsString( '<div class="section aimeos catalog-list', $response->getContent() ); |
||||
18 | } |
||||
19 | } |