1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace Fgm\ComposerCheck\Tests;
- use Fgm\ComposerCheck\YamlReporter;
- /**
- * Test case for the YamlReporter.
- */
- class YamlReporterTest extends ReporterTestBase {
- /**
- * {@inheritdoc}
- */
- public function tearDown() {
- $this->reporter = new YamlReporter();
- 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 = <<<YAML
- dev: { }
- run: { }
- YAML;
- }
- }
|