Skip to content

Commit 8b4606c

Browse files
committed
OXDEV-542 Add the functionality for plain text and basis for the rich text editor
1 parent 0af9130 commit 8b4606c

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

README.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,27 @@ is loaded before database dump creation and before running any of the
299299
test, so can be used autoloaders registration, demodata preparation,
300300
etc. For unit testing shop is installed without default demodata added.
301301

302+
Methods usage
303+
^^^^^^^^^^^^^
304+
305+
Run unit and integration test dependent if Subshops is enabled:
306+
307+
.. code:: php
308+
309+
public function testCase_forSubShops()
310+
{
311+
$this->markTestSkippedIfSubShop();
312+
...
313+
}
314+
315+
public function testCase_forNoSubShops()
316+
{
317+
$this->markTestSkippedIfNoSubShop();
318+
...
319+
}
320+
321+
Rest of the methods can be found in class: ``OxidEsales\TestingLibrary\UnitTestCase``.
322+
302323
Writing acceptance tests
303324
~~~~~~~~~~~~~~~~~~~~~~~~
304325

library/UnitTestCase.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,28 @@ public function removeClassExtension($extension, $class = '')
810810
$utilsObject->setModuleVar("aModules", $extensions);
811811
}
812812

813+
/**
814+
* Mark test run as skipped if tests are run with Subshop flag enabled.
815+
* Allows to write Subshop only test case.
816+
*/
817+
public function markTestSkippedIfSubShop()
818+
{
819+
if ($this->getTestConfig()->isSubShop()) {
820+
$this->markTestSkipped('Test is NOT for subshops!');
821+
}
822+
}
823+
824+
/**
825+
* Mark test run as skipped if tests are run with NO Subshop flag enabled.
826+
* Allows to write Subshop only test case.
827+
*/
828+
public function markTestSkippedIfNoSubShop()
829+
{
830+
if (!$this->getTestConfig()->isSubShop()) {
831+
$this->markTestSkipped('Test is ONLY for subshops!');
832+
}
833+
}
834+
813835
/**
814836
* Set a given protected property of a given class instance to a given value.
815837
*

0 commit comments

Comments
 (0)