From 24bb5fefbdf93ce0969b7f56cc46c459ebb82a95 Mon Sep 17 00:00:00 2001 From: EoleDev Date: Thu, 14 Apr 2016 16:24:44 +0200 Subject: Mise a jour et nettoyage depot --- .../common/tests/unit/Common/Api/OperationTest.php | 74 ---------------------- 1 file changed, 74 deletions(-) delete mode 100644 server/vendor/php-opencloud/common/tests/unit/Common/Api/OperationTest.php (limited to 'server/vendor/php-opencloud/common/tests/unit/Common/Api/OperationTest.php') diff --git a/server/vendor/php-opencloud/common/tests/unit/Common/Api/OperationTest.php b/server/vendor/php-opencloud/common/tests/unit/Common/Api/OperationTest.php deleted file mode 100644 index ea0f7c8..0000000 --- a/server/vendor/php-opencloud/common/tests/unit/Common/Api/OperationTest.php +++ /dev/null @@ -1,74 +0,0 @@ -postServer(); - - $this->operation = new Operation($def); - } - - public function test_it_reveals_whether_params_are_set_or_not() - { - $this->assertFalse($this->operation->hasParam('foo')); - $this->assertTrue($this->operation->hasParam('name')); - } - - public function test_it_gets_params() - { - $this->assertInstanceOf(Parameter::class, $this->operation->getParam('name')); - } - - public function test_it_validates_params() - { - $this->assertTrue($this->operation->validate([ - 'name' => 'foo', - 'imageId' => 'bar', - 'flavorId' => 'baz', - ])); - } - - /** - * @expectedException \Exception - */ - public function test_exceptions_are_propagated() - { - $this->assertFalse($this->operation->validate([ - 'name' => true, - 'imageId' => 'bar', - 'flavorId' => 'baz', - ])); - } - - /** - * @expectedException \Exception - */ - public function test_an_exception_is_thrown_when_user_does_not_provide_required_options() - { - $this->operation->validate([]); - } - - /** - * @expectedException \Exception - */ - public function test_it_throws_exception_when_user_provides_undefined_options() - { - $userData = ['name' => 'new_server', 'undefined_opt' => 'bah']; - - $this->operation->validate($userData); - } - - public function test_it_gets_json_key() - { - $this->assertEquals('server', $this->operation->getJsonKey()); - } -} -- cgit v1.2.3