aimeos /
aimeos-symfony
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Aimeos\ShopBundle\Tests\Controller; |
||
| 4 | |||
| 5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
||
| 6 | |||
| 7 | |||
| 8 | class SupplierControllerTest extends WebTestCase |
||
| 9 | { |
||
| 10 | protected function setUp() : void |
||
| 11 | { |
||
| 12 | \Aimeos\MShop::cache( false ); |
||
| 13 | \Aimeos\Controller\Frontend::cache( false ); |
||
| 14 | } |
||
| 15 | |||
| 16 | |||
| 17 | public function testDetail() |
||
| 18 | { |
||
| 19 | $client = static::createClient(); |
||
| 20 | |||
| 21 | $context = $this->getContainer()->get( 'aimeos.context' )->get( false ); |
||
| 22 | $context->setLocale( $this->getContainer()->get( 'aimeos.locale' )->getBackend( $context, 'unittest' ) ); |
||
| 23 | $supplier = \Aimeos\MShop::create( $context, 'supplier' )->find( 'unitSupplier001' ); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 24 | |||
| 25 | $crawler = $client->request( 'GET', '/unittest/de/EUR/s/TestSupplier/' . $supplier->getId() ); |
||
| 26 | |||
| 27 | $this->assertEquals( 1, $crawler->filter( '.supplier-detail' )->count() ); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |