Skip to content

Commit

Permalink
#6 Sort components alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmarsal committed Apr 26, 2016
1 parent e164f65 commit 03ebcb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Zf2ComponentsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public function scan($project)
}
}

ksort($this->components);

return $this;
}

Expand Down
7 changes: 3 additions & 4 deletions test/Zf2ComponentsListTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

namespace RbTest\Generator;

use Rb\Generator\Zf2ComponentsList as Zf2ComponentsListGenerator;
Expand All @@ -13,7 +12,7 @@ public function testScan()
{
$zf2ComponentsListGenerator = new Zf2ComponentsListGenerator();

$this->assertEquals(
$this->assertSame(
$zf2ComponentsListGenerator->scan(__DIR__ . '/' . self::TEST_PROJECT)
->getComponents(),
array(
Expand All @@ -22,10 +21,10 @@ public function testScan()
"zend-cache" => true,
"zend-captcha" => true,
"zend-code" => true,
"zend-config" => true,
"zend-console" => true,
"zend-stdlib" => true,
"zend-log" => true,
"zend-config" => true,
"zend-stdlib" => true,
)
);
}
Expand Down

0 comments on commit 03ebcb4

Please sign in to comment.