Skip to content

Commit

Permalink
Merge pull request #4632 from nanasess/bundle-plugin-testing
Browse files Browse the repository at this point in the history
Bundle に依存するプラグインの E2Eテスト追加
  • Loading branch information
Kiyotaka Oku committed Jul 30, 2020
2 parents fb15eb1 + 70d71c7 commit 52e07ff
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ jobs:
- test_install_enable_disable_enable_disable_remove_local
- test_install_remove_local
- test_install_remove_store
- test_bundle_install_enable_disable_remove_store
- test_bundle_install_update_enable_disable_remove_store
include:
- db: pgsql
database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db
Expand Down
Binary file added codeception/_data/plugins/Bundle-1.0.0.tgz
Binary file not shown.
Binary file added codeception/_data/plugins/Bundle-1.0.1.tgz
Binary file not shown.
50 changes: 50 additions & 0 deletions codeception/acceptance/EA10PluginCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,26 @@ public function test_template_overwrite(\AcceptanceTester $I)
$fs->remove($dir);
}

public function test_bundle_install_enable_disable_remove_store(\AcceptanceTester $I)
{
$Bundle = Bundle_Store::start($I);
$Bundle->インストール()
->有効化()
->無効化()
->削除();
}

public function test_bundle_install_update_enable_disable_remove_store(\AcceptanceTester $I)
{
$Bundle = Bundle_Store::start($I);
$Bundle->インストール()
->有効化()
->アップデート()
->有効化()
->無効化()
->削除();
}

private function publishPlugin($fileName)
{
copy(codecept_data_dir().'/'.'plugins/'.$fileName, codecept_root_dir().'/repos/'.$fileName);
Expand Down Expand Up @@ -965,3 +985,33 @@ public static function start(AcceptanceTester $I)
return new self($I);
}
}

class Bundle_Store extends Store_Plugin
{
public function __construct(AcceptanceTester $I)
{
parent::__construct($I, 'Bundle');
$this->tables[] = 'oauth2_client';
$this->tables[] = 'oauth2_refresh_token';
$this->tables[] = 'oauth2_access_token';
$this->tables[] = 'oauth2_authorization_code';
}

public function 有効化()
{
parent::有効化();

return $this;
}

public function 無効化()
{
parent::無効化();

return $this;
}
public static function start(AcceptanceTester $I)
{
return new self($I);
}
}

0 comments on commit 52e07ff

Please sign in to comment.