Example #1
0
 /**
  * Make sure that we can copy the subjects of another collection.
  */
 public function testCopySubjects()
 {
     $a = new Subject();
     $b = new Subject();
     $c = new Subject();
     $d = new Subject();
     Property::set($this->collection, 'subjects', array('b' => $b));
     $collection = new Collection();
     Property::set($collection, 'subjects', array('a' => $a, 'b' => $c, 'c' => $d));
     $this->collection->copySubjects($collection);
     $this->assertSame(array('b' => $c, 'a' => $a, 'c' => $d), Property::get($this->collection, 'subjects'), 'The subjects should have been copied correctly.');
 }