![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/dev/tests/integration/testsuite/Magento/Wishlist/Block/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Wishlist\Block; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\View\LayoutInterface; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; /** * Class test link my wish list in customer menu. * * @magentoAppArea frontend * @magentoDbIsolation enabled * @magentoAppIsolation disabled */ class LinkTest extends TestCase { /** @var ObjectManagerInterface */ private $objectManager; /** @var Link */ private $block; /** * @inheritdoc */ protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); $this->block = $this->objectManager->get(LayoutInterface::class)->createBlock(Link::class); } /** * @return void */ public function testWishListLinkVisible(): void { $this->assertStringContainsString('My Wish List', strip_tags($this->block->toHtml())); } /** * @magentoConfigFixture current_store wishlist/general/active 0 * * @return void */ public function testWishListLinkNotVisible(): void { $this->assertEmpty($this->block->toHtml()); } }