1
0
Fork 0

Add types to tests/composer/test/json (#10222)

Co-authored-by: Jakob Vibe <jv@ipw.dk>
pull/10231/head
jakobvibe 2021-10-27 11:37:51 +02:00 committed by GitHub
parent df6c2ce1db
commit f667c7b8de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -90,6 +90,11 @@ class ComposerSchemaTest extends TestCase
$this->assertTrue($this->check($json), 'stable'); $this->assertTrue($this->check($json), 'stable');
} }
/**
*
* @param string $json
* @return mixed
*/
private function check($json) private function check($json)
{ {
$validator = new Validator(); $validator = new Validator();

View File

@ -354,6 +354,11 @@ class JsonFileTest extends TestCase
$this->assertEquals($data, $doubleData); $this->assertEquals($data, $doubleData);
} }
/**
* @param string $text
* @param string $json
* @return void
*/
private function expectParseException($text, $json) private function expectParseException($text, $json)
{ {
try { try {
@ -364,6 +369,13 @@ class JsonFileTest extends TestCase
} }
} }
/**
*
* @param string $json
* @param mixed $data
* @param integer|null $options
* @return void
*/
private function assertJsonFormat($json, $data, $options = null) private function assertJsonFormat($json, $data, $options = null)
{ {
$file = new JsonFile('composer.json'); $file = new JsonFile('composer.json');