Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Makedo/issue-6
Issue 6
- Loading branch information
Showing
7 changed files
with
197 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Test; | ||
|
||
use ByJG\Swagger\SwaggerSchema; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class SwaggerBodyTestCase extends TestCase | ||
{ | ||
|
||
/** | ||
* @param bool $allowNullValues | ||
* @return SwaggerSchema | ||
*/ | ||
protected static function swaggerSchema($allowNullValues = false) | ||
{ | ||
return new SwaggerSchema( | ||
self::getSwaggerJsonContent(), | ||
$allowNullValues | ||
); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
protected static function getSwaggerJsonContent() | ||
{ | ||
return file_get_contents(__DIR__ . '/example/swagger.json'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.