public function test_callbacks_on_create_with_validation() { $expected = array('beforeSave', 'beforeValidation', 'afterValidation', 'beforeValidationOnCreate', 'afterValidationOnCreate', 'beforeCreate', 'afterCreate', 'afterSave'); $CreateTest = new TestCallback(array('name' => 'Another Name')); $CreateTest->save(true); $this->assertEqual($CreateTest->__called, $expected); $this->assertEqual($this->Observer->__called, $expected); }
public function testMultiDownload() { return; ############################# print "testMultiDownload is disabled\n"; return; $urls = ['https://encrypted.google.com/#q=foo', 'http://yahoo.com/thisfiledoesntexistsoitwill404.php', 'http://www.google.com/#q=foo']; $callback = new TestCallback(); $settings = new Kademlia\Settings(); $http = new Kademlia\Http($settings); $result = $http->multiDownload($urls, Kademlia\HttpMultiDownload::PING)->enqueue()->done([$callback, 'callme']); $callback->expectOnce('callme', [$urls]); }