mageekguy\atoum\tests\units\scripts\phar\generator::test__construct PHP Method

test__construct() public method

public test__construct ( )
    public function test__construct()
    {
        $this->if($adapter = new atoum\test\adapter())->and($adapter->php_sapi_name = function () {
            return uniqid();
        })->then->exception(function () use(&$name, $adapter) {
            $generator = new phar\generator($name = uniqid(), $adapter);
        })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('\'' . $name . '\' must be used in CLI only')->if($adapter->php_sapi_name = function () {
            return 'cli';
        })->and($generator = new phar\generator($name = uniqid(), $adapter))->then->object($generator->getAdapter())->isIdenticalTo($adapter)->object($generator->getLocale())->isInstanceOf('mageekguy\\atoum\\locale')->object($generator->getOutputWriter())->isInstanceOf('mageekguy\\atoum\\writer')->object($generator->getErrorWriter())->isInstanceOf('mageekguy\\atoum\\writer')->string($generator->getName())->isEqualTo($name)->variable($generator->getOriginDirectory())->isNull()->variable($generator->getDestinationDirectory())->isNull()->object($generator->getArgumentsParser())->isInstanceOf('mageekguy\\atoum\\script\\arguments\\parser');
    }