File tree Expand file tree Collapse file tree 4 files changed +18
-10
lines changed
Expand file tree Collapse file tree 4 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,15 @@ public function getPersistedVersions()
6060 {
6161 $ this ->init ();
6262
63- $ versions = $ this ->storageNode ->getNodeNames ();
63+ $ versionNodes = $ this ->storageNode ->getNodes ();
64+ $ versions = array ();
65+
66+ foreach ($ versionNodes as $ versionNode ) {
67+ $ versions [$ versionNode ->getName ()] = array (
68+ 'name ' => $ versionNode ->getName (),
69+ 'executed ' => $ versionNode ->getPropertyValue ('jcr:created ' ),
70+ );
71+ }
6472
6573 return $ versions ;
6674 }
Original file line number Diff line number Diff line change @@ -22,17 +22,17 @@ class MigratorFactoryTest extends \PHPUnit_Framework_TestCase
2222{
2323 public function testFactory ()
2424 {
25- $ storage = $ this ->prophesize (VersionStorage::class );
26- $ finder = $ this ->prophesize (VersionFinder::class );
27- $ session = $ this ->prophesize (SessionInterface::class );
28- $ finder ->getCollection ()->willReturn ($ this ->prophesize (VersionCollection::class )->reveal ());
25+ $ storage = $ this ->prophesize (' DTL\PhpcrMigrations\ VersionStorage' );
26+ $ finder = $ this ->prophesize (' DTL\PhpcrMigrations\ VersionFinder' );
27+ $ session = $ this ->prophesize (' PHPCR\ SessionInterface' );
28+ $ finder ->getCollection ()->willReturn ($ this ->prophesize (' DTL\PhpcrMigrations\ VersionCollection' )->reveal ());
2929
3030 $ factory = new MigratorFactory (
3131 $ storage ->reveal (),
3232 $ finder ->reveal (),
3333 $ session ->reveal ()
3434 );
3535 $ migrator = $ factory ->getMigrator ();
36- $ this ->assertInstanceOf (Migrator::class , $ migrator );
36+ $ this ->assertInstanceOf (' DTL\PhpcrMigrations\ Migrator' , $ migrator );
3737 }
3838}
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ class VersionCollectionTest extends \PHPUnit_Framework_TestCase
2222
2323 public function setUp ()
2424 {
25- $ this ->version1 = $ this ->prophesize (VersionInterface::class );
26- $ this ->version2 = $ this ->prophesize (VersionInterface::class );
27- $ this ->version3 = $ this ->prophesize (VersionInterface::class );
25+ $ this ->version1 = $ this ->prophesize (' DTL\PhpcrMigrations\ VersionInterface' );
26+ $ this ->version2 = $ this ->prophesize (' DTL\PhpcrMigrations\ VersionInterface' );
27+ $ this ->version3 = $ this ->prophesize (' DTL\PhpcrMigrations\ VersionInterface' );
2828 }
2929
3030 /**
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function setUp()
3131 public function testGetCollection ()
3232 {
3333 $ collection = $ this ->finder ->getCollection ();
34- $ this ->assertInstanceOf (VersionCollection::class , $ collection );
34+ $ this ->assertInstanceOf (' DTL\PhpcrMigrations\ VersionCollection' , $ collection );
3535 $ versions = $ collection ->getAllVersions ();
3636 $ this ->assertCount (3 , $ versions );
3737 }
You can’t perform that action at this time.
0 commit comments