1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace Fgm\ComposerCheck\Tests;
- use Fgm\ComposerCheck\JsonReporter;
- /**
- * Test case for the JsonReporter.
- */
- class JsonReporterTest extends ReporterTestBase {
- /**
- * {@inheritdoc}
- */
- public function tearDown() {
- $this->reporter = new JsonReporter();
- parent::tearDown();
- }
- /**
- * Test reporting on an empty requirements/lock list.
- */
- public function testEmptyReport() {
- $this->prophecy->getRows()->willReturn([]);
- $this->expected = '[]';
- }
- /**
- * Test reporting on a normal non-empty list.
- */
- public function testNonEmptyReport() {
- $this->prophecy->getRows()->willReturn([
- 'dev' => [],
- 'run' => [],
- ]);
- $this->expected = <<<JSON
- {
- "dev": [],
- "run": []
- }
- JSON;
- }
- }
|