diff --git a/tests/dependencies/installer_test.php b/tests/dependencies/installer_test.php index bebc2d4..0009ccf 100644 --- a/tests/dependencies/installer_test.php +++ b/tests/dependencies/installer_test.php @@ -17,7 +17,7 @@ public function testInstallAll() $my_theme = [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ]; @@ -44,7 +44,7 @@ public function testInstallAll() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $gitMyTheme = $this->getGit(false, 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'); + $gitMyTheme = $this->getGit(false, 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/themes/my-theme', $gitMyTheme); $gitMyPlugin = $this->getGit(false, 'git@github.com:dxw-wordpress-plugins/my-plugin', '123456'); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/plugins/my-plugin', $gitMyPlugin); @@ -169,7 +169,7 @@ public function testInstallArchiveRepo() $my_theme = [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ]; @@ -181,7 +181,7 @@ public function testInstallArchiveRepo() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $gitMyTheme = $this->getGit(false, 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906', true); + $gitMyTheme = $this->getGit(false, 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906', true); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/themes/my-theme', $gitMyTheme); $inspection_check_results = function ($type, $dep) { @@ -233,7 +233,7 @@ public function testInstallAllThemeAlreadyCloned() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -333,7 +333,7 @@ public function testInstallAllCloneFails() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -341,7 +341,7 @@ public function testInstallAllCloneFails() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $gitMyTheme = $this->getGit(false, ['with' => 'git@git.govpress.com:wordpress-themes/my-theme', 'return' => false], null); + $gitMyTheme = $this->getGit(false, ['with' => 'git@github.com:dxw-wordpress-themes/my-theme', 'return' => false], null); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/themes/my-theme', $gitMyTheme); $dependencies = new \Dxw\Whippet\Dependencies\Installer( @@ -369,7 +369,7 @@ public function testInstallAllCheckoutFails() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -377,7 +377,7 @@ public function testInstallAllCheckoutFails() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $gitMyTheme = $this->getGit(false, 'git@git.govpress.com:wordpress-themes/my-theme', ['with' => '27ba906', 'return' => false]); + $gitMyTheme = $this->getGit(false, 'git@github.com:dxw-wordpress-themes/my-theme', ['with' => '27ba906', 'return' => false]); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/themes/my-theme', $gitMyTheme); $dependencies = new \Dxw\Whippet\Dependencies\Installer( @@ -431,7 +431,7 @@ public function testInstallSingle() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -492,7 +492,7 @@ public function testInstallSingleAlreadyCloned() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -537,7 +537,7 @@ public function testInstallSingleAlreadyClonedAndArchived() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -598,7 +598,7 @@ public function testInstallSingleCloneFails() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -606,7 +606,7 @@ public function testInstallSingleCloneFails() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $gitMyTheme = $this->getGit(false, ['with' => 'git@git.govpress.com:wordpress-themes/my-theme', 'return' => false], null); + $gitMyTheme = $this->getGit(false, ['with' => 'git@github.com:dxw-wordpress-themes/my-theme', 'return' => false], null); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/themes/my-theme', $gitMyTheme); $dependencies = new \Dxw\Whippet\Dependencies\Installer( @@ -634,7 +634,7 @@ public function testInstallSingleCheckoutFails() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -642,7 +642,7 @@ public function testInstallSingleCheckoutFails() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $gitMyTheme = $this->getGit(false, 'git@git.govpress.com:wordpress-themes/my-theme', ['with' => '27ba906', 'return' => false]); + $gitMyTheme = $this->getGit(false, 'git@github.com:dxw-wordpress-themes/my-theme', ['with' => '27ba906', 'return' => false]); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Git', $dir.'/wp-content/themes/my-theme', $gitMyTheme); $dependencies = new \Dxw\Whippet\Dependencies\Installer( diff --git a/tests/dependencies/updater_test.php b/tests/dependencies/updater_test.php index 9fa9212..0278eb0 100644 --- a/tests/dependencies/updater_test.php +++ b/tests/dependencies/updater_test.php @@ -68,7 +68,7 @@ public function testUpdateAll() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', 'plugins' => 'git@github.com:dxw-wordpress-plugins/', ], 'themes' => [ @@ -95,12 +95,12 @@ public function testUpdateAll() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ['plugins', 'my-plugin', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'd961c3d'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( @@ -123,7 +123,7 @@ public function testUpdateAllWithExistingGitignore() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -149,11 +149,11 @@ public function testUpdateAllWithExistingGitignore() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -175,7 +175,7 @@ public function testUpdateAllWithExistingGitignoreNoDuplication() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -202,11 +202,11 @@ public function testUpdateAllWithExistingGitignoreNoDuplication() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -227,7 +227,7 @@ public function testUpdateAllFailedGitCommand() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -248,7 +248,7 @@ public function testUpdateAllFailedGitCommand() $whippetLock = $this->getWhippetLockWritable([], sha1('foobar'), null, []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::err('oh no')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::err('oh no')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -270,7 +270,7 @@ public function testUpdateAllWithExplicitSrc() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -315,7 +315,7 @@ public function testUpdateAllWithoutRef() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -333,11 +333,11 @@ public function testUpdateAllWithoutRef() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'main', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'main', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -358,7 +358,7 @@ public function testUpdateAllWithoutRefUsingMaster() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -376,12 +376,12 @@ public function testUpdateAllWithoutRefUsingMaster() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'main', \Result\Result::err('no such branch')); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'master', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'main', \Result\Result::err('no such branch')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'master', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -430,7 +430,7 @@ public function testUpdateAllNoGitignore() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', 'plugins' => 'git@github.com:dxw-wordpress-plugins/', ], 'themes' => [ @@ -457,12 +457,12 @@ public function testUpdateAllNoGitignore() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ['plugins', 'my-plugin', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'd961c3d'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( @@ -485,7 +485,7 @@ public function testUpdateAllRemoveFromGitignore() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -509,7 +509,7 @@ public function testUpdateAllRemoveFromGitignore() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', [ ['themes', []], ['plugins', [ @@ -518,7 +518,7 @@ public function testUpdateAllRemoveFromGitignore() ]); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( @@ -560,7 +560,7 @@ public function testUpdateAllNoExistingWhippetLock() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', 'plugins' => 'git@github.com:dxw-wordpress-plugins/', ], 'themes' => [ @@ -587,12 +587,12 @@ public function testUpdateAllNoExistingWhippetLock() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ['plugins', 'my-plugin', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'd961c3d'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryNewInstance('\\Dxw\\Whippet\\Files\\WhippetLock', [], $whippetLock); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::err('file not found')); @@ -643,7 +643,7 @@ public function testUpdateAllWithBrokenJson() $whippetLock = $this->getWhippetLockWritable([], sha1('foobar'), null, []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( @@ -777,7 +777,7 @@ public function testUpdateSingleBrokenJson() $whippetLock = $this->getWhippetLockWritable([], sha1('foobar'), null, []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( @@ -801,7 +801,7 @@ public function testUpdateSingleWithExistingGitignore() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -827,11 +827,11 @@ public function testUpdateSingleWithExistingGitignore() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -853,7 +853,7 @@ public function testUpdateSingleWithExistingGitignoreNoDuplication() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -880,11 +880,11 @@ public function testUpdateSingleWithExistingGitignoreNoDuplication() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -905,7 +905,7 @@ public function testUpdateSingleFailedGitCommand() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -931,7 +931,7 @@ public function testUpdateSingleFailedGitCommand() $whippetLock = $this->getWhippetLockWritable([], sha1('foobar'), null, []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::err('oh no')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::err('oh no')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -953,7 +953,7 @@ public function testUpdateSingleWithExplicitSrc() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', 'plugins' => 'git@github.com:dxw-wordpress-plugins/', ], 'themes' => [ @@ -1007,7 +1007,7 @@ public function testUpdateSingleWithoutRef() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', ], 'themes' => [ [ @@ -1031,11 +1031,11 @@ public function testUpdateSingleWithoutRef() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'main', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'main', \Result\Result::ok('27ba906')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( $this->getFactory(), @@ -1056,7 +1056,7 @@ public function testUpdateSingleNoGitignore() $whippetJson = $this->getWhippetJson([ 'src' => [ - 'themes' => 'git@git.govpress.com:wordpress-themes/', + 'themes' => 'git@github.com:dxw-wordpress-themes/', 'plugins' => 'git@github.com:dxw-wordpress-plugins/', ], 'themes' => [ @@ -1083,11 +1083,11 @@ public function testUpdateSingleNoGitignore() $this->addFactoryNewInstance('\\Dxw\\Whippet\\Git\\Gitignore', $dir, $gitignore); $whippetLock = $this->getWhippetLockWritable([ - ['themes', 'my-theme', 'git@git.govpress.com:wordpress-themes/my-theme', '27ba906'], + ['themes', 'my-theme', 'git@github.com:dxw-wordpress-themes/my-theme', '27ba906'], ], sha1('foobar'), $dir.'/whippet.lock', []); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Files\\WhippetLock', 'fromFile', $dir.'/whippet.lock', \Result\Result::ok($whippetLock)); - $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@git.govpress.com:wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); + $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-themes/my-theme', 'v1.4', \Result\Result::ok('27ba906')); $this->addFactoryCallStatic('\\Dxw\\Whippet\\Git\\Git', 'ls_remote', 'git@github.com:dxw-wordpress-plugins/my-plugin', 'v1.6', \Result\Result::ok('d961c3d')); $dependencies = new \Dxw\Whippet\Dependencies\Updater( diff --git a/tests/files/whippet_lock_test.php b/tests/files/whippet_lock_test.php index 329325a..d33a8db 100644 --- a/tests/files/whippet_lock_test.php +++ b/tests/files/whippet_lock_test.php @@ -10,7 +10,7 @@ public function testGetDependencies() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -19,7 +19,7 @@ public function testGetDependencies() $this->assertEquals([ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], $whippetLock->getDependencies('themes')); @@ -31,7 +31,7 @@ public function testFromStringGetDependencies() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -41,7 +41,7 @@ public function testFromStringGetDependencies() $this->assertEquals([ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], $whippetLock->unwrap()->getDependencies('themes')); @@ -55,7 +55,7 @@ public function testFromFileGetDependencies() 'themes' => [ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], @@ -67,7 +67,7 @@ public function testFromFileGetDependencies() $this->assertEquals([ [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ], ], $whippetLock->unwrap()->getDependencies('themes')); @@ -104,11 +104,11 @@ public function testAddDependency() { $whippetLock = new \Dxw\Whippet\Files\WhippetLock([]); - $whippetLock->addDependency('plugins', 'my-plugin', 'git@git.govpress.com:foobar/baz', '123abc'); + $whippetLock->addDependency('plugins', 'my-plugin', 'git@github.com/foobar/baz', '123abc'); $this->assertEquals([ [ 'name' => 'my-plugin', - 'src' => 'git@git.govpress.com:foobar/baz', + 'src' => 'git@github.com/foobar/baz', 'revision' => '123abc', ], ], $whippetLock->getDependencies('plugins')); @@ -120,27 +120,27 @@ public function testAddDependencyThatAlreadyExists() 'plugins' => [ [ 'name' => 'my-other-plugin', - 'src' => 'git@git.govpress.com:foobar/bat', + 'src' => 'git@github.com/foobar/bat', 'revision' => 'zzz', ], [ 'name' => 'my-plugin', - 'src' => 'git@git.govpress.com:foobar/baz', + 'src' => 'git@github.com/foobar/baz', 'revision' => '456789', ], ], ]); - $whippetLock->addDependency('plugins', 'my-plugin', 'git@git.govpress.com:foobar/baz', '123abc'); + $whippetLock->addDependency('plugins', 'my-plugin', 'git@github.com/foobar/baz', '123abc'); $this->assertEquals([ [ 'name' => 'my-other-plugin', - 'src' => 'git@git.govpress.com:foobar/bat', + 'src' => 'git@github.com/foobar/bat', 'revision' => 'zzz', ], [ 'name' => 'my-plugin', - 'src' => 'git@git.govpress.com:foobar/baz', + 'src' => 'git@github.com/foobar/baz', 'revision' => '123abc', ], ], $whippetLock->getDependencies('plugins')); diff --git a/tests/services/inspection_checker_test.php b/tests/services/inspection_checker_test.php index bc58974..5f0c187 100644 --- a/tests/services/inspection_checker_test.php +++ b/tests/services/inspection_checker_test.php @@ -11,7 +11,7 @@ public function testTheme() { $my_theme = [ 'name' => 'my-theme', - 'src' => 'git@git.govpress.com:wordpress-themes/my-theme', + 'src' => 'git@github.com:dxw-wordpress-themes/my-theme', 'revision' => '27ba906', ]; $checker = new \Dxw\Whippet\Services\InspectionChecker($this->fakeInspectionsApi());