예제 #1
0
 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']);
 }
예제 #2
0
 /**
  * @dataProvider providerCompare
  */
 public function testCompare($object, $compare, $expect)
 {
     $snapshot = new ObjectSnapshot($object);
     $this->assertSame($expect, $snapshot->isComparable($compare));
 }