public function testResetEventCallbacks() { Book::addEventCallBack('foo_event', function ($book) { $book->foo = 'bar'; }); $book = new Book($this->conn); $book->foo = 'foo'; $book->callEvent('foo_event'); $this->assertSame('bar', $book->foo); Book::resetEventCallbacks(); $book->foo = 'foo'; $book->callEvent('foo_event'); $this->assertSame('foo', $book->foo); }