Commit 2b9963d5 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

! Add alias to use shortened class name in tests

parent 6f8b629a
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org> * @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>
*/ */
use EcomDev_PHPUnit_Test_Case_Util as TestUtil;
/** /**
* Basic test case class * Basic test case class
* *
...@@ -27,11 +29,11 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -27,11 +29,11 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
/** /**
* @deprecated since 0.3.0 * @deprecated since 0.3.0
**/ **/
const XML_PATH_DEFAULT_FIXTURE_MODEL = EcomDev_PHPUnit_Test_Case_Util::XML_PATH_DEFAULT_FIXTURE_MODEL; const XML_PATH_DEFAULT_FIXTURE_MODEL = TestUtil::XML_PATH_DEFAULT_FIXTURE_MODEL;
/** /**
* @deprecated since 0.3.0 * @deprecated since 0.3.0
**/ **/
const XML_PATH_DEFAULT_EXPECTATION_MODEL = EcomDev_PHPUnit_Test_Case_Util::XML_PATH_DEFAULT_EXPECTATION_MODEL; const XML_PATH_DEFAULT_EXPECTATION_MODEL = TestUtil::XML_PATH_DEFAULT_EXPECTATION_MODEL;
/** /**
...@@ -67,7 +69,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -67,7 +69,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public static function app() public static function app()
{ {
return EcomDev_PHPUnit_Test_Case_Util::app(); return TestUtil::app();
} }
/** /**
...@@ -258,7 +260,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -258,7 +260,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public function getModuleName() public function getModuleName()
{ {
return EcomDev_PHPUnit_Test_Case_Util::getModuleName($this); return TestUtil::getModuleName($this);
} }
/** /**
...@@ -269,7 +271,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -269,7 +271,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
protected static function getModuleNameFromCallStack() protected static function getModuleNameFromCallStack()
{ {
return EcomDev_PHPUnit_Test_Case_Util::getModuleNameFromCallStack(); return TestUtil::getModuleNameFromCallStack();
} }
...@@ -284,7 +286,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -284,7 +286,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public function getAnnotationByName($name, $sources = 'method') public function getAnnotationByName($name, $sources = 'method')
{ {
return EcomDev_PHPUnit_Test_Case_Util::getAnnotationByNameFromClass(get_class($this), $name, $sources, $this->getName(false)); return TestUtil::getAnnotationByNameFromClass(get_class($this), $name, $sources, $this->getName(false));
} }
/** /**
...@@ -299,7 +301,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -299,7 +301,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public static function getAnnotationByNameFromClass($className, $name, $sources = 'class', $testName = '') public static function getAnnotationByNameFromClass($className, $name, $sources = 'class', $testName = '')
{ {
return EcomDev_PHPUnit_Test_Case_Util::getAnnotationByNameFromClass($className, $name, $sources, $testName); return TestUtil::getAnnotationByNameFromClass($className, $name, $sources, $testName);
} }
/** /**
...@@ -326,7 +328,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -326,7 +328,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
protected function replaceByMock($type, $classAlias, $mock) protected function replaceByMock($type, $classAlias, $mock)
{ {
EcomDev_PHPUnit_Test_Case_Util::replaceByMock($type, $classAlias, $mock); TestUtil::replaceByMock($type, $classAlias, $mock);
return $this; return $this;
} }
...@@ -339,7 +341,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -339,7 +341,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
protected function replaceRegistry($key, $value) protected function replaceRegistry($key, $value)
{ {
EcomDev_PHPUnit_Test_Case_Util::replaceRegistry($key, $value); TestUtil::replaceRegistry($key, $value);
return $this; return $this;
} }
...@@ -362,7 +364,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -362,7 +364,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
$arguments = $firstArgument; $arguments = $firstArgument;
} }
return EcomDev_PHPUnit_Test_Case_Util::expected($this, $arguments); return TestUtil::expected($this, $arguments);
} }
/** /**
...@@ -602,7 +604,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -602,7 +604,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
protected static function getFixture() protected static function getFixture()
{ {
return EcomDev_PHPUnit_Test_Case_Util::getFixture(get_called_class()); return TestUtil::getFixture(get_called_class());
} }
/** /**
...@@ -613,7 +615,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -613,7 +615,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
protected function getExpectation() protected function getExpectation()
{ {
return EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($this)); return TestUtil::getExpectation(get_class($this));
} }
...@@ -628,7 +630,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -628,7 +630,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
protected static function getLoadableClassAlias($type, $configPath) protected static function getLoadableClassAlias($type, $configPath)
{ {
return EcomDev_PHPUnit_Test_Case_Util::getLoadableClassAlias(get_called_class(), $type, $configPath); return TestUtil::getLoadableClassAlias(get_called_class(), $type, $configPath);
} }
/** /**
...@@ -661,7 +663,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -661,7 +663,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
$name = $this->getName(false); $name = $this->getName(false);
} }
return EcomDev_PHPUnit_Test_Case_Util::getYamlFilePath(get_called_class(), $type, $name); return TestUtil::getYamlFilePath(get_called_class(), $type, $name);
} }
/** /**
...@@ -677,7 +679,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -677,7 +679,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public static function getYamlFilePathByClass($className, $type, $name) public static function getYamlFilePathByClass($className, $type, $name)
{ {
return EcomDev_PHPUnit_Test_Case_Util::getYamlFilePath($className, $type, $name); return TestUtil::getYamlFilePath($className, $type, $name);
} }
/** /**
...@@ -689,7 +691,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -689,7 +691,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public function dataProvider($testName) public function dataProvider($testName)
{ {
return EcomDev_PHPUnit_Test_Case_Util::dataProvider(get_called_class(), $testName); return TestUtil::dataProvider(get_called_class(), $testName);
} }
/** /**
...@@ -700,7 +702,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase ...@@ -700,7 +702,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/ */
public function setCurrentStore($store) public function setCurrentStore($store)
{ {
EcomDev_PHPUnit_Test_Case_Util::setCurrentStore($store); TestUtil::setCurrentStore($store);
return $this; return $this;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment