Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

複数のテストファイルで使われているtearUp()、正しくはtearDown()? #983

Closed
clicktx opened this issue Aug 29, 2024 · 2 comments · Fixed by #990
Closed

Comments

@clicktx
Copy link
Contributor

clicktx commented Aug 29, 2024

class SC_Helper_Address_deleteAddressTest extends SC_Helper_Address_TestBase
{
protected function setUp()
{
parent::setUp();
$this->objAddress = new SC_Helper_Address_Ex();
}
protected function tearUp()
{
parent::tearUp();
}

testを見ていたらtearUp()という関数が複数のテストファイルで使われている(記述されている)ようです。
正しくはtearDown()ですかね??
親クラスには該当の関数は無さそうだし、呼び出されないので無害かと思いますが。

protected function tearDown()
{
parent::tearDown();
}

は書かなくても親クラスのものが呼ばれるようなのでテストを実行するにあたっては問題ないようです。

@nanasess
Copy link
Contributor

11年前からの名残りですね。単なる typo だと思います。

@clicktx
Copy link
Contributor Author

clicktx commented Aug 30, 2024

後ほど修正してPRします

clicktx added a commit to clicktx/ec-cube2 that referenced this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants