/** * Make sure an exception is thrown if we replace a non-existent subject. */ public function testReplaceSubjectNotRegistered() { $subject = new Subject(); $this->setExpectedException('Phine\\Observer\\Exception\\CollectionException', 'The "test" subject unique identifier is not in use.'); $this->collection->replaceSubject('test', $subject); }