Laravel version update
Laravel version update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,13 +8,20 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use SebastianBergmann\GlobalState\TestFixture\BlacklistedChildClass;
|
||||
use SebastianBergmann\GlobalState\TestFixture\BlacklistedClass;
|
||||
use SebastianBergmann\GlobalState\TestFixture\BlacklistedImplementor;
|
||||
use SebastianBergmann\GlobalState\TestFixture\BlacklistedInterface;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\GlobalState\Blacklist
|
||||
*/
|
||||
class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
class BlacklistTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \SebastianBergmann\GlobalState\Blacklist
|
||||
@@ -42,7 +49,7 @@ class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
|
||||
BlacklistedClass::class,
|
||||
'attribute'
|
||||
)
|
||||
);
|
||||
@@ -50,11 +57,11 @@ class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testClassCanBeBlacklisted()
|
||||
{
|
||||
$this->blacklist->addClass('SebastianBergmann\GlobalState\TestFixture\BlacklistedClass');
|
||||
$this->blacklist->addClass(BlacklistedClass::class);
|
||||
|
||||
$this->assertTrue(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
|
||||
BlacklistedClass::class,
|
||||
'attribute'
|
||||
)
|
||||
);
|
||||
@@ -62,11 +69,11 @@ class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSubclassesCanBeBlacklisted()
|
||||
{
|
||||
$this->blacklist->addSubclassesOf('SebastianBergmann\GlobalState\TestFixture\BlacklistedClass');
|
||||
$this->blacklist->addSubclassesOf(BlacklistedClass::class);
|
||||
|
||||
$this->assertTrue(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedChildClass',
|
||||
BlacklistedChildClass::class,
|
||||
'attribute'
|
||||
)
|
||||
);
|
||||
@@ -74,11 +81,11 @@ class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testImplementorsCanBeBlacklisted()
|
||||
{
|
||||
$this->blacklist->addImplementorsOf('SebastianBergmann\GlobalState\TestFixture\BlacklistedInterface');
|
||||
$this->blacklist->addImplementorsOf(BlacklistedInterface::class);
|
||||
|
||||
$this->assertTrue(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedImplementor',
|
||||
BlacklistedImplementor::class,
|
||||
'attribute'
|
||||
)
|
||||
);
|
||||
@@ -90,7 +97,7 @@ class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertTrue(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
|
||||
BlacklistedClass::class,
|
||||
'attribute'
|
||||
)
|
||||
);
|
||||
@@ -99,13 +106,13 @@ class BlacklistTest extends PHPUnit_Framework_TestCase
|
||||
public function testStaticAttributeCanBeBlacklisted()
|
||||
{
|
||||
$this->blacklist->addStaticAttribute(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
|
||||
BlacklistedClass::class,
|
||||
'attribute'
|
||||
);
|
||||
|
||||
$this->assertTrue(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
'SebastianBergmann\GlobalState\TestFixture\BlacklistedClass',
|
||||
BlacklistedClass::class,
|
||||
'attribute'
|
||||
)
|
||||
);
|
||||
|
||||
38
vendor/sebastian/global-state/tests/CodeExporterTest.php
vendored
Normal file
38
vendor/sebastian/global-state/tests/CodeExporterTest.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\GlobalState\CodeExporter
|
||||
*/
|
||||
class CodeExporterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testCanExportGlobalVariablesToCode()
|
||||
{
|
||||
$GLOBALS = ['foo' => 'bar'];
|
||||
|
||||
$snapshot = new Snapshot(null, true, false, false, false, false, false, false, false, false);
|
||||
|
||||
$exporter = new CodeExporter;
|
||||
|
||||
$this->assertEquals(
|
||||
'$GLOBALS = [];' . PHP_EOL . '$GLOBALS[\'foo\'] = \'bar\';' . PHP_EOL,
|
||||
$exporter->globalVariables($snapshot)
|
||||
);
|
||||
}
|
||||
}
|
||||
105
vendor/sebastian/global-state/tests/RestorerTest.php
vendored
Normal file
105
vendor/sebastian/global-state/tests/RestorerTest.php
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Class Restorer.
|
||||
*/
|
||||
class RestorerTest extends TestCase
|
||||
{
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
$GLOBALS['varBool'] = false;
|
||||
$GLOBALS['varNull'] = null;
|
||||
$_GET['varGet'] = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check global variables are correctly backuped and restored (unit test).
|
||||
*
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreGlobalVariables
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreSuperGlobalArray
|
||||
*
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist::isGlobalVariableBlacklisted
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::__construct
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::blacklist
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::canBeSerialized
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::globalVariables
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::setupSuperGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotGlobals
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotSuperGlobalArray
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalVariables
|
||||
*/
|
||||
public function testRestorerGlobalVariable()
|
||||
{
|
||||
$snapshot = new Snapshot(null, true, false, false, false, false, false, false, false, false);
|
||||
$restorer = new Restorer;
|
||||
$restorer->restoreGlobalVariables($snapshot);
|
||||
|
||||
$this->assertArrayHasKey('varBool', $GLOBALS);
|
||||
$this->assertEquals(false, $GLOBALS['varBool']);
|
||||
$this->assertArrayHasKey('varNull', $GLOBALS);
|
||||
$this->assertEquals(null, $GLOBALS['varNull']);
|
||||
$this->assertArrayHasKey('varGet', $_GET);
|
||||
$this->assertEquals(0, $_GET['varGet']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check global variables are correctly backuped and restored.
|
||||
*
|
||||
* The real test is the second, but the first has to be executed to backup the globals.
|
||||
*
|
||||
* @backupGlobals enabled
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreGlobalVariables
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreSuperGlobalArray
|
||||
*
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist::addClassNamePrefix
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist::isGlobalVariableBlacklisted
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::__construct
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::blacklist
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::canBeSerialized
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::globalVariables
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::setupSuperGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotGlobals
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotSuperGlobalArray
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalVariables
|
||||
*/
|
||||
public function testIntegrationRestorerGlobalVariables()
|
||||
{
|
||||
$this->assertArrayHasKey('varBool', $GLOBALS);
|
||||
$this->assertEquals(false, $GLOBALS['varBool']);
|
||||
$this->assertArrayHasKey('varNull', $GLOBALS);
|
||||
$this->assertEquals(null, $GLOBALS['varNull']);
|
||||
$this->assertArrayHasKey('varGet', $_GET);
|
||||
$this->assertEquals(0, $_GET['varGet']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check global variables are correctly backuped and restored.
|
||||
*
|
||||
* @depends testIntegrationRestorerGlobalVariables
|
||||
*/
|
||||
public function testIntegrationRestorerGlobalVariables2()
|
||||
{
|
||||
$this->assertArrayHasKey('varBool', $GLOBALS);
|
||||
$this->assertEquals(false, $GLOBALS['varBool']);
|
||||
$this->assertArrayHasKey('varNull', $GLOBALS);
|
||||
$this->assertEquals(null, $GLOBALS['varNull']);
|
||||
$this->assertArrayHasKey('varGet', $_GET);
|
||||
$this->assertEquals(0, $_GET['varGet']);
|
||||
}
|
||||
}
|
||||
101
vendor/sebastian/global-state/tests/SnapshotTest.php
vendored
101
vendor/sebastian/global-state/tests/SnapshotTest.php
vendored
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,93 +8,100 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use ArrayObject;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use SebastianBergmann\GlobalState\TestFixture\BlacklistedInterface;
|
||||
use SebastianBergmann\GlobalState\TestFixture\SnapshotClass;
|
||||
use SebastianBergmann\GlobalState\TestFixture\SnapshotTrait;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\GlobalState\Snapshot
|
||||
*/
|
||||
class SnapshotTest extends PHPUnit_Framework_TestCase
|
||||
class SnapshotTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var Blacklist
|
||||
*/
|
||||
private $blacklist;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->blacklist = $this->createMock(Blacklist::class);
|
||||
}
|
||||
|
||||
public function testStaticAttributes()
|
||||
{
|
||||
$blacklist = $this->getBlacklist();
|
||||
$blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback(function ($class) {
|
||||
return $class !== 'SebastianBergmann\GlobalState\TestFixture\SnapshotClass';
|
||||
});
|
||||
$this->blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback(
|
||||
function ($class) {
|
||||
return $class !== SnapshotClass::class;
|
||||
}
|
||||
);
|
||||
|
||||
SnapshotClass::init();
|
||||
|
||||
$snapshot = new Snapshot($blacklist, false, true, false, false, false, false, false, false, false);
|
||||
$expected = array('SebastianBergmann\GlobalState\TestFixture\SnapshotClass' => array(
|
||||
'string' => 'snapshot',
|
||||
'arrayObject' => new ArrayObject(array(1, 2, 3)),
|
||||
'stdClass' => new \stdClass(),
|
||||
));
|
||||
$snapshot = new Snapshot($this->blacklist, false, true, false, false, false, false, false, false, false);
|
||||
|
||||
$expected = [
|
||||
SnapshotClass::class => [
|
||||
'string' => 'snapshot',
|
||||
'arrayObject' => new ArrayObject([1, 2, 3]),
|
||||
'stdClass' => new \stdClass(),
|
||||
]
|
||||
];
|
||||
|
||||
$this->assertEquals($expected, $snapshot->staticAttributes());
|
||||
}
|
||||
|
||||
public function testConstants()
|
||||
{
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, true, false, false, false, false, false, false);
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, true, false, false, false, false, false, false);
|
||||
|
||||
$this->assertArrayHasKey('GLOBALSTATE_TESTSUITE', $snapshot->constants());
|
||||
}
|
||||
|
||||
public function testFunctions()
|
||||
{
|
||||
require_once __DIR__.'/_fixture/SnapshotFunctions.php';
|
||||
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, false, true, false, false, false, false, false);
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, true, false, false, false, false, false);
|
||||
$functions = $snapshot->functions();
|
||||
|
||||
$this->assertThat(
|
||||
$functions,
|
||||
$this->logicalOr(
|
||||
// Zend
|
||||
$this->contains('sebastianbergmann\globalstate\testfixture\snapshotfunction'),
|
||||
// HHVM
|
||||
$this->contains('SebastianBergmann\GlobalState\TestFixture\snapshotFunction')
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertContains('sebastianbergmann\globalstate\testfixture\snapshotfunction', $functions);
|
||||
$this->assertNotContains('assert', $functions);
|
||||
}
|
||||
|
||||
public function testClasses()
|
||||
{
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, true, false, false, false, false);
|
||||
$classes = $snapshot->classes();
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, true, false, false, false, false);
|
||||
$classes = $snapshot->classes();
|
||||
|
||||
$this->assertContains('PHPUnit_Framework_TestCase', $classes);
|
||||
$this->assertNotContains('Exception', $classes);
|
||||
$this->assertContains(TestCase::class, $classes);
|
||||
$this->assertNotContains(Exception::class, $classes);
|
||||
}
|
||||
|
||||
public function testInterfaces()
|
||||
{
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, true, false, false, false);
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, true, false, false, false);
|
||||
$interfaces = $snapshot->interfaces();
|
||||
|
||||
$this->assertContains('PHPUnit_Framework_Test', $interfaces);
|
||||
$this->assertNotContains('Countable', $interfaces);
|
||||
$this->assertContains(BlacklistedInterface::class, $interfaces);
|
||||
$this->assertNotContains(\Countable::class, $interfaces);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHP 5.4
|
||||
*/
|
||||
public function testTraits()
|
||||
{
|
||||
spl_autoload_call('SebastianBergmann\GlobalState\TestFixture\SnapshotTrait');
|
||||
\spl_autoload_call('SebastianBergmann\GlobalState\TestFixture\SnapshotTrait');
|
||||
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, false, true, false, false);
|
||||
$this->assertContains('SebastianBergmann\GlobalState\TestFixture\SnapshotTrait', $snapshot->traits());
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, false, true, false, false);
|
||||
|
||||
$this->assertContains(SnapshotTrait::class, $snapshot->traits());
|
||||
}
|
||||
|
||||
public function testIniSettings()
|
||||
{
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, false, false, true, false);
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, false, false, true, false);
|
||||
$iniSettings = $snapshot->iniSettings();
|
||||
|
||||
$this->assertArrayHasKey('date.timezone', $iniSettings);
|
||||
@@ -103,17 +110,7 @@ class SnapshotTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testIncludedFiles()
|
||||
{
|
||||
$snapshot = new Snapshot($this->getBlacklist(), false, false, false, false, false, false, false, false, true);
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, false, false, false, true);
|
||||
$this->assertContains(__FILE__, $snapshot->includedFiles());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SebastianBergmann\GlobalState\Blacklist
|
||||
*/
|
||||
private function getBlacklist()
|
||||
{
|
||||
return $this->getMockBuilder('SebastianBergmann\GlobalState\Blacklist')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,10 +8,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
/**
|
||||
*/
|
||||
class BlacklistedChildClass extends BlacklistedClass
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,10 +8,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
/**
|
||||
*/
|
||||
class BlacklistedClass
|
||||
{
|
||||
private static $attribute;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,10 +8,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
/**
|
||||
*/
|
||||
class BlacklistedImplementor implements BlacklistedInterface
|
||||
{
|
||||
private static $attribute;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,10 +8,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
/**
|
||||
*/
|
||||
interface BlacklistedInterface
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,13 +8,13 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
use DomDocument;
|
||||
use ArrayObject;
|
||||
|
||||
/**
|
||||
*/
|
||||
class SnapshotClass
|
||||
{
|
||||
private static $string = 'snapshot';
|
||||
@@ -27,11 +27,11 @@ class SnapshotClass
|
||||
|
||||
public static function init()
|
||||
{
|
||||
self::$dom = new DomDocument();
|
||||
self::$closure = function () {};
|
||||
self::$arrayObject = new ArrayObject(array(1, 2, 3));
|
||||
self::$dom = new DomDocument();
|
||||
self::$closure = function () {};
|
||||
self::$arrayObject = new ArrayObject([1, 2, 3]);
|
||||
self::$snapshotDomDocument = new SnapshotDomDocument();
|
||||
self::$resource = fopen('php://memory', 'r');
|
||||
self::$stdClass = new \stdClass();
|
||||
self::$resource = \fopen('php://memory', 'r');
|
||||
self::$stdClass = new \stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,12 +8,12 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
use DomDocument;
|
||||
|
||||
/**
|
||||
*/
|
||||
class SnapshotDomDocument extends DomDocument
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,6 +8,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
function snapshotFunction()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the GlobalState package.
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -8,10 +8,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
/**
|
||||
*/
|
||||
trait SnapshotTrait
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user