Example #1
0
 public function testCleanupClearsData()
 {
     $mock = $this->getMock(stdClass::class, []);
     Factory::injectObject(stdClass::class, $mock);
     $object = Factory::createNewObject(stdClass::class);
     $this->assertEquals($mock, $object);
     Factory::cleanup();
     $object = Factory::createNewObject(stdClass::class);
     $this->assertNotEquals($mock, $object);
 }