public function testSetFactoryLooksUncallable() { $di = new \Elgg\Di\DiContainer(); $this->setExpectedException('InvalidArgumentException', '$factory must appear callable'); $di->setFactory('foo', new \stdClass()); }