for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* janitor (http://juliangut.com/janitor).
* Effortless maintenance management.
*
* @license BSD-3-Clause
* @link https://github.com/juliangut/janitor
* @author Julián Gutiérrez <[email protected]>
*/
namespace Janitor\Test\Watcher;
use Janitor\Watcher\Environment;
/**
* Class EnvironmentTest.
class EnvironmentTest extends \PHPUnit_Framework_TestCase
{
* @var Environment
protected $watcher;
* {@inheritdoc}
public static function setUpBeforeClass()
putenv('JanitorMaintenance=On');
}
public static function tearDownAfterClass()
putenv('JanitorMaintenance');
public function setUp()
$this->watcher = new Environment('JanitorMaintenance');
public function testIsNotActive()
self::assertTrue($this->watcher->isActive());
$this->watcher->addVariable('JanitorMaintenance', 'Off');
self::assertFalse($this->watcher->isActive());
public function testIsActive()
$this->watcher->addVariable('JanitorMaintenance', 'On');