Symbiote\Components\Tests\ComponentTest
Synopsis
class ComponentTest
extends SapphireTest
{
- // methods
- public void setUp()
- public void tearDown()
- public void testCustomizedComponentPath()
- public void testSimpleCase()
- public void testSingleQuoteCharacterIsEscaped()
- public void testBackslashCharacterIsEscaped()
- public void testPassingOptionalTypeProperty()
- public void testSelfClosingSupport()
- public void testNewlineSupport()
- public void testIfStatement()
- public void testSSListSupport()
- public void testViewableDataSupport()
- public void testAvoidBadXMLEscaping()
- public void testComponentUsingClassButNotPassedIn()
- public void testCatchReservedProperty()
- public void testJSONProperty()
- public void testJSONEscapedCharacters()
- public void testJSONPropertyErrorHandling()
- public void testJSONDeeplyNested()
- public void testJSONMultiRoot()
- protected void assertEqualIgnoringWhitespace()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Methods
protected
- assertEqualIgnoringWhitespace() — Taken from "framework\tests\view\SSViewerTest.php"
public
- setUp()
- tearDown()
- testAvoidBadXMLEscaping() — This is to make sure that "double quoting" doesn't occur when passing "getAttributesHTML" into a component, ie. Resulting HTML looks like:
- testBackslashCharacterIsEscaped() — Make sure that \ characters are escaped.
- testCatchReservedProperty() — If you don't pass a $class variable in, $class will end up defaulting to 'Symbiote\Components\ComponentData' without additional logic that prevents that (found in ComponentData class)
- testComponentUsingClassButNotPassedIn() — If you don't pass a $class variable in, $class will end up defaulting to 'Symbiote\Components\ComponentData' without additional logic that prevents that (found in ComponentData class)
- testCustomizedComponentPath()
- testIfStatement()
- testJSONDeeplyNested() — Test iterating nested arrays in templates
- testJSONEscapedCharacters()
- testJSONMultiRoot() — Test iterating multiple root level properties in templates
- testJSONProperty() — Test custom JSON syntax that allows arbitrary JSON.
- testJSONPropertyErrorHandling() — Test that the error message given when using JSON is useful when debugging.
- testNewlineSupport()
- testPassingOptionalTypeProperty()
- testSSListSupport()
- testSelfClosingSupport()
- testSimpleCase()
- testSingleQuoteCharacterIsEscaped() — Make sure that ' characters are escaped.
- testViewableDataSupport() — Test to make sure anything that inherits ViewableData works inside a template.