Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EcomDev_PHPUnit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open
EcomDev_PHPUnit
Commits
2b9963d5
Commit
2b9963d5
authored
Feb 02, 2013
by
Ivan Chepurnyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
! Add alias to use shortened class name in tests
parent
6f8b629a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
app/code/community/EcomDev/PHPUnit/Test/Case.php
app/code/community/EcomDev/PHPUnit/Test/Case.php
+19
-17
No files found.
app/code/community/EcomDev/PHPUnit/Test/Case.php
View file @
2b9963d5
...
...
@@ -16,6 +16,8 @@
* @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>
*/
use
EcomDev_PHPUnit_Test_Case_Util
as
TestUtil
;
/**
* Basic test case class
*
...
...
@@ -27,11 +29,11 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
/**
* @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
=
Test
Util
::
XML_PATH_DEFAULT_FIXTURE_MODEL
;
/**
* @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
=
Test
Util
::
XML_PATH_DEFAULT_EXPECTATION_MODEL
;
/**
...
...
@@ -67,7 +69,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
static
function
app
()
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
app
();
return
Test
Util
::
app
();
}
/**
...
...
@@ -258,7 +260,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
function
getModuleName
()
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getModuleName
(
$this
);
return
Test
Util
::
getModuleName
(
$this
);
}
/**
...
...
@@ -269,7 +271,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
protected
static
function
getModuleNameFromCallStack
()
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getModuleNameFromCallStack
();
return
Test
Util
::
getModuleNameFromCallStack
();
}
...
...
@@ -284,7 +286,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
function
getAnnotationByName
(
$name
,
$sources
=
'method'
)
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getAnnotationByNameFromClass
(
get_class
(
$this
),
$name
,
$sources
,
$this
->
getName
(
false
));
return
Test
Util
::
getAnnotationByNameFromClass
(
get_class
(
$this
),
$name
,
$sources
,
$this
->
getName
(
false
));
}
/**
...
...
@@ -299,7 +301,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
static
function
getAnnotationByNameFromClass
(
$className
,
$name
,
$sources
=
'class'
,
$testName
=
''
)
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getAnnotationByNameFromClass
(
$className
,
$name
,
$sources
,
$testName
);
return
Test
Util
::
getAnnotationByNameFromClass
(
$className
,
$name
,
$sources
,
$testName
);
}
/**
...
...
@@ -326,7 +328,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
protected
function
replaceByMock
(
$type
,
$classAlias
,
$mock
)
{
EcomDev_PHPUnit_Test_Case_
Util
::
replaceByMock
(
$type
,
$classAlias
,
$mock
);
Test
Util
::
replaceByMock
(
$type
,
$classAlias
,
$mock
);
return
$this
;
}
...
...
@@ -339,7 +341,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
protected
function
replaceRegistry
(
$key
,
$value
)
{
EcomDev_PHPUnit_Test_Case_
Util
::
replaceRegistry
(
$key
,
$value
);
Test
Util
::
replaceRegistry
(
$key
,
$value
);
return
$this
;
}
...
...
@@ -362,7 +364,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
$arguments
=
$firstArgument
;
}
return
EcomDev_PHPUnit_Test_Case_
Util
::
expected
(
$this
,
$arguments
);
return
Test
Util
::
expected
(
$this
,
$arguments
);
}
/**
...
...
@@ -602,7 +604,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
protected
static
function
getFixture
()
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getFixture
(
get_called_class
());
return
Test
Util
::
getFixture
(
get_called_class
());
}
/**
...
...
@@ -613,7 +615,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
protected
function
getExpectation
()
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getExpectation
(
get_class
(
$this
));
return
Test
Util
::
getExpectation
(
get_class
(
$this
));
}
...
...
@@ -628,7 +630,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
protected
static
function
getLoadableClassAlias
(
$type
,
$configPath
)
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getLoadableClassAlias
(
get_called_class
(),
$type
,
$configPath
);
return
Test
Util
::
getLoadableClassAlias
(
get_called_class
(),
$type
,
$configPath
);
}
/**
...
...
@@ -661,7 +663,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
$name
=
$this
->
getName
(
false
);
}
return
EcomDev_PHPUnit_Test_Case_
Util
::
getYamlFilePath
(
get_called_class
(),
$type
,
$name
);
return
Test
Util
::
getYamlFilePath
(
get_called_class
(),
$type
,
$name
);
}
/**
...
...
@@ -677,7 +679,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
static
function
getYamlFilePathByClass
(
$className
,
$type
,
$name
)
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
getYamlFilePath
(
$className
,
$type
,
$name
);
return
Test
Util
::
getYamlFilePath
(
$className
,
$type
,
$name
);
}
/**
...
...
@@ -689,7 +691,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
function
dataProvider
(
$testName
)
{
return
EcomDev_PHPUnit_Test_Case_
Util
::
dataProvider
(
get_called_class
(),
$testName
);
return
Test
Util
::
dataProvider
(
get_called_class
(),
$testName
);
}
/**
...
...
@@ -700,7 +702,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*/
public
function
setCurrentStore
(
$store
)
{
EcomDev_PHPUnit_Test_Case_
Util
::
setCurrentStore
(
$store
);
Test
Util
::
setCurrentStore
(
$store
);
return
$this
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment