Select Git revision
PhpFileDumper.php
-
Bartek Jaskulski authored
Signed-off-by:
Bart Jaskulski <bjaskulski@protonmail.com>
Bartek Jaskulski authoredSigned-off-by:
Bart Jaskulski <bjaskulski@protonmail.com>
TestConstantNotDefinedStrategy.php 680 B
<?php
namespace unit;
use WPDesk\ShowDecision\ConstantNotDefinedStrategy;
class TestConstantNotDefinedStrategy extends \WP_Mock\Tools\TestCase
{
public function testShouldNotDisplayWhenConstantIsDefined()
{
// Given
define('TEST3_CONSTANT', 'test');
$strategy = new ConstantNotDefinedStrategy('TEST_CONSTANT');
// When & Then
$this->assertFalse($strategy->shouldDisplay());
}
public function testShouldDisplayWhenConstantIsNotDefined()
{
// Given
$strategy = new ConstantNotDefinedStrategy('TEST4_CONSTANT');
// When & Then
$this->assertTrue($strategy->shouldDisplay());
}
}