Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead. Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead. Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
52 lines
1004 B
PHP
52 lines
1004 B
PHP
<?php
|
|
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
|
/**
|
|
* Tests for PhpMyAdmin\Navigation\Nodes\NodeTrigger class
|
|
*
|
|
* @package PhpMyAdmin-test
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpMyAdmin\Tests\Navigation\Nodes;
|
|
|
|
use PhpMyAdmin\Navigation\NodeFactory;
|
|
use PhpMyAdmin\Tests\PmaTestCase;
|
|
use PhpMyAdmin\Theme;
|
|
|
|
/**
|
|
* Tests for PhpMyAdmin\Navigation\Nodes\NodeTrigger class
|
|
*
|
|
* @package PhpMyAdmin-test
|
|
*/
|
|
class NodeTriggerTest extends PmaTestCase
|
|
{
|
|
/**
|
|
* SetUp for test cases
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function setUp(): void
|
|
{
|
|
$GLOBALS['server'] = 0;
|
|
}
|
|
|
|
|
|
/**
|
|
* Test for __construct
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testConstructor()
|
|
{
|
|
$parent = NodeFactory::getInstance('NodeTrigger');
|
|
$this->assertArrayHasKey(
|
|
'text',
|
|
$parent->links
|
|
);
|
|
$this->assertStringContainsString(
|
|
'db_triggers.php',
|
|
$parent->links['text']
|
|
);
|
|
}
|
|
}
|