This topic contains 5 replies, has 3 voices, and was last updated by Mike Kudelya 7 years, 3 months ago.
- Topic
Hi,
I’m writing tests and I want to test a datagrid.
I’m using this :12345$response = $this->client->requestGrid(array('gridName'=> 'grid-produit-variants','sku' => 1);But it seems that my parameter ‘sku’ is not passed to the datagrid.
Datagrid part (in dev env the bind works) :
12345where:and:- v.sku = :parambind_parameters:param: skuI got the following error message when testing :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354Oro\Bundle\DataGridBundle\Exception\InvalidArgumentException: Cannot bind datasource parameter "param", there is no datagrid parameter with path "sku"./opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datasource/Orm/ParameterBinder.php:167/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datasource/Orm/ParameterBinder.php:102/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datasource/Orm/OrmDatasource.php:165/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/EventListener/DatasourceBindParametersListener.php:38/opt/propalcrp/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:184/opt/propalcrp/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:46/opt/propalcrp/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php:43/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Event/EventDispatcher.php:38/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datagrid/Builder.php:126/opt/propalcrp/app/cache/test/appTestProjectContainer.php:61/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datagrid/Manager.php:70/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datagrid/Manager.php:123/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/TestFrameworkBundle/Test/Client.php:162/opt/propalcrp/src/CL/Bundle/VariantBundle/Tests/Controller/VariantControllerTest.php:33phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestCase.php:1103phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestCase.php:954phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestResult.php:701phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestCase.php:909phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestSuite.php:753phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestSuite.php:753phar:///opt/propalcrp/phpunit.phar/phpunit/TextUI/TestRunner.php:465phar:///opt/propalcrp/phpunit.phar/phpunit/TextUI/Command.php:185phar:///opt/propalcrp/phpunit.phar/phpunit/TextUI/Command.php:115Caused bySymfony\Component\PropertyAccess\Exception\NoSuchPropertyException: The key "sku" does exist in an array./opt/propalcrp/vendor/oro/platform/src/Oro/Component/PropertyAccess/PropertyAccessor.php:418/opt/propalcrp/vendor/oro/platform/src/Oro/Component/PropertyAccess/PropertyAccessor.php:242/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datasource/Orm/ParameterBinder.php:162/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datasource/Orm/ParameterBinder.php:102/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datasource/Orm/OrmDatasource.php:165/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/EventListener/DatasourceBindParametersListener.php:38/opt/propalcrp/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:184/opt/propalcrp/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:46/opt/propalcrp/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php:43/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Event/EventDispatcher.php:38/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datagrid/Builder.php:126/opt/propalcrp/app/cache/test/appTestProjectContainer.php:61/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datagrid/Manager.php:70/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Datagrid/Manager.php:123/opt/propalcrp/vendor/oro/platform/src/Oro/Bundle/TestFrameworkBundle/Test/Client.php:162/opt/propalcrp/src/CL/Bundle/VariantBundle/Tests/Controller/VariantControllerTest.php:33phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestCase.php:1103phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestCase.php:954phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestResult.php:701phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestCase.php:909phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestSuite.php:753phar:///opt/propalcrp/phpunit.phar/phpunit/Framework/TestSuite.php:753phar:///opt/propalcrp/phpunit.phar/phpunit/TextUI/TestRunner.php:465phar:///opt/propalcrp/phpunit.phar/phpunit/TextUI/Command.php:185phar:///opt/propalcrp/phpunit.phar/phpunit/TextUI/Command.php:115(BTW is it me or shouldn’t the error message be
1Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException: The key "sku" does NOT exist in an array.instead of
1Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException: The key "sku" does exist in an array.?)
Can someone help me please ?
Thank you.
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.