From ac49e619310dad9abbb1823afadad27198a71ced Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 20 May 2021 15:41:56 +0200 Subject: [PATCH] Add more tests Co-authored-by: Guilliam Xavier --- tests/Composer/Test/Json/ComposerSchemaTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php index d6880348a..172be4259 100644 --- a/tests/Composer/Test/Json/ComposerSchemaTest.php +++ b/tests/Composer/Test/Json/ComposerSchemaTest.php @@ -42,6 +42,9 @@ class ComposerSchemaTest extends TestCase $json = '{ }'; $result = $this->check($json); $this->assertContains(array('property' => 'type', 'message' => 'The property type is required', 'constraint' => 'required'), $result); + $this->assertContains(array('property' => 'name', 'message' => 'The property name is required', 'constraint' => 'required'), $result); + $this->assertContains(array('property' => 'description', 'message' => 'The property description is required', 'constraint' => 'required'), $result); + $this->assertContains(array('property' => '', 'message' => 'Failed to match exactly one schema', 'constraint' => 'oneOf'), $result); $json = '{ "name": "vendor/package" }'; $this->assertEquals(array(