magento-engcom / php-7.2-support

Repository for implementing support of php-7.2 support in Magento
Open Software License 3.0
23 stars 25 forks source link

Failing integration test Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest #62

Closed buskamuza closed 6 years ago

buskamuza commented 6 years ago

Important: Use libs-upgrade branch as base for this task and as target for the PR.

8) Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest::testGetItems
PHPUnit\Framework\Exception: Notice: Undefined offset: 0 in /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php:816. in /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/bootstrap.php:130
Stack trace:
#0 /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php(816): {closure}(8, 'Undefined offse...', '/home/travis/bu...', 816, Array)
#1 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/tmp/sandbox-0-c4b5b25471e569aacd36194c2bad027e/generated/code/Magento/Reports/Model/ResourceModel/Product/Index/Viewed/Collection/Interceptor.php(1051): Magento\Eav\Model\Entity\Collection\AbstractCollection->joinTable(Array, 'product_id=enti...', Array, Array, 'inner')
#2 /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Reports/Model/ResourceModel/Product/Index/Collection/AbstractCollection.php(126): Magento\Reports\Model\ResourceModel\Product\Index\Viewed\Collection\Interceptor->joinTable(Array, 'product_id=enti...', Array, Array)
#3 /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Reports/Model/ResourceModel/Product/Index/Collection/AbstractCollection.php(140): Magento\Reports\Model\ResourceModel\Product\Index\Collection\AbstractCollection->_joinIdxTable()
#4 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/tmp/sandbox-0-c4b5b25471e569aacd36194c2bad027e/generated/code/Magento/Reports/Model/ResourceModel/Product/Index/Viewed/Collection/Interceptor.php(24): Magento\Reports\Model\ResourceModel\Product\Index\Collection\AbstractCollection->addIndexFilter()
#5 /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php(199): Magento\Reports\Model\ResourceModel\Product\Index\Viewed\Collection\Interceptor->addIndexFilter()
#6 /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Reports/Observer/CatalogProductViewObserver.php(79): Magento\Reports\Model\Product\Index\AbstractIndex->calculate()
#7 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php(37): Magento\Reports\Observer\CatalogProductViewObserver->execute(Object(Magento\Framework\Event\Observer))
#8 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php(171): require('/home/travis/bu...')
#9 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php(196): Magento\TestFramework\Annotation\DataFixture->_applyOneFixture('/home/travis/bu...')
#10 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php(89): Magento\TestFramework\Annotation\DataFixture->_applyFixtures(Array)
#11 [internal function]: Magento\TestFramework\Annotation\DataFixture->startTransaction(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#12 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/EventManager.php(49): call_user_func_array(Array, Array)
#13 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php(96): Magento\TestFramework\EventManager->fireEvent('startTransactio...', Array)
#14 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php(81): Magento\TestFramework\Event\Transaction->_startTransaction(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#15 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php(46): Magento\TestFramework\Event\Transaction->_processTransactionRequests('startTest', Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#16 [internal function]: Magento\TestFramework\Event\Transaction->startTest(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#17 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/EventManager.php(49): call_user_func_array(Array, Array)
#18 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/PhpUnit.php(126): Magento\TestFramework\EventManager->fireEvent('startTest', Array)
#19 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestResult.php(395): Magento\TestFramework\Event\PhpUnit->startTest(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#20 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestResult.php(637): PHPUnit\Framework\TestResult->startTest(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#21 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestCase.php(883): PHPUnit\Framework\TestResult->run(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#22 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestSuite.php(744): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#23 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestSuite.php(744): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#24 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(537): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#25 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/TextUI/Command.php(212): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#26 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/TextUI/Command.php(141): PHPUnit\TextUI\Command->run(Array, true)
#27 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#28 {main}
Next Exception: Error in fixture: "\/home\/travis\/build\/magento-engcom\/php-7.2-support\/dev\/tests\/integration\/testsuite\/Magento\/Reports\/_files\/viewed_products.php".
 Notice: Undefined offset: 0 in /home/travis/build/magento-engcom/php-7.2-support/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php:816. in /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php:174
Stack trace:
#0 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php(196): Magento\TestFramework\Annotation\DataFixture->_applyOneFixture('/home/travis/bu...')
#1 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php(89): Magento\TestFramework\Annotation\DataFixture->_applyFixtures(Array)
#2 [internal function]: Magento\TestFramework\Annotation\DataFixture->startTransaction(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#3 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/EventManager.php(49): call_user_func_array(Array, Array)
#4 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php(96): Magento\TestFramework\EventManager->fireEvent('startTransactio...', Array)
#5 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php(81): Magento\TestFramework\Event\Transaction->_startTransaction(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#6 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php(46): Magento\TestFramework\Event\Transaction->_processTransactionRequests('startTest', Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#7 [internal function]: Magento\TestFramework\Event\Transaction->startTest(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#8 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/EventManager.php(49): call_user_func_array(Array, Array)
#9 /home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/PhpUnit.php(126): Magento\TestFramework\EventManager->fireEvent('startTest', Array)
#10 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestResult.php(395): Magento\TestFramework\Event\PhpUnit->startTest(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#11 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestResult.php(637): PHPUnit\Framework\TestResult->startTest(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#12 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestCase.php(883): PHPUnit\Framework\TestResult->run(Object(Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest))
#13 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestSuite.php(744): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#14 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/Framework/TestSuite.php(744): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#15 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(537): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#16 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/TextUI/Command.php(212): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#17 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/src/TextUI/Command.php(141): PHPUnit\TextUI\Command->run(Array, true)
#18 /home/travis/build/magento-engcom/php-7.2-support/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#19 {main}
/home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php:100
/home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php:81
/home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php:46
/home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/EventManager.php:49
/home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/framework/Magento/TestFramework/Event/PhpUnit.php:126

9) Magento\Reports\Model\ResourceModel\Report\Product\Viewed\CollectionTest::testGetItems
Failed asserting that an array is not empty.
/home/travis/build/magento-engcom/php-7.2-support/dev/tests/integration/testsuite/Magento/Reports/Model/ResourceModel/Report/Product/Viewed/CollectionTest.php:38

See https://travis-ci.org/magento-engcom/php-7.2-support/jobs/342577325#L1355