Skip to content
Snippets Groups Projects
Select Git revision
  • e6999847886f3cb06bbe35ca6edf5185e66790fd
  • master default protected
  • fix/deprecated_functions
  • devel
  • feat/translations
  • feat/upgrade_to_pro_url
  • feat/lang
  • bugfix/require-interface
  • bugfix/require-once-error
  • feature/activation-hooks
  • feature/template-loader
  • feature/template-renderer
  • feature/plugin-activation
  • feature/hookable-object
  • feature/builder-pattern
  • 2.1.2
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 2.0.0-beta1
  • 1.4.4
  • 1.4.3
  • 1.4.2
  • 1.4.1
  • 1.4
  • 1.3.3
  • 1.3.2
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1
  • 1.0
32 results

Has_Plugin_Info.php

Blame
  • 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());
        }
    
    }