Files
Phraseanet/tests/classes/api/api_webhookTest.php
Nicolas Le Goff 1250f8ab0b Fix latest merge
2014-06-19 16:11:27 +02:00

24 lines
616 B
PHP

<?php
use Alchemy\Phrasea\Exception\RuntimeException;
class API_WebhookTest extends \PhraseanetTestCase
{
public function testsNewApiHook()
{
$w = \API_Webhook::create(self::$DI['app']['phraseanet.appbox'], 'new_feed', array('w1', 'salut' => 'you'));
$this->assertInstanceOf('\API_webhook', $w);
$w->delete();
}
public function testNewApiHookObjectNotFound()
{
try {
$w = new \API_Webhook(self::$DI['app']['phraseanet.appbox'], -1);
$this->fail('It should raise an exception');
} catch (RuntimeException $e) {
}
}
}