public function testDeepConstructor() { $object = new Foo((object) ['foo' => 'bar'], ['baz' => 'fubar'], 'fubaz'); $snapshot = new ObjectSnapshot($object); $data = $snapshot->getComparableData(); $this->assertInstanceOf('Totem\\Snapshot\\ObjectSnapshot', $data['foo']); $this->assertInstanceOf('Totem\\Snapshot\\ArraySnapshot', $data['bar']); $this->assertNotInstanceOf('Totem\\AbstractSnapshot', $data['baz']); }
/** * @dataProvider providerCompare */ public function testCompare($object, $compare, $expect) { $snapshot = new ObjectSnapshot($object); $this->assertSame($expect, $snapshot->isComparable($compare)); }