\StaticSiteFileTransformerTest
- Author: Russell Michell <russell@silverstripe.com>
Synopsis
class StaticSiteFileTransformerTest
extends SapphireTest
{
- // members
- protected StaticSiteFileTransformer $transformer;
- public static string $fixture_file = 'StaticSiteContentSource.yml';
- // methods
- public void setUp()
- public void tearDownOnce()
- public type delTree()
- public void testBuildFileProperties()
- public void testTransformForURLNotInCacheIsFile()
- public void testTransformForURLIsInCacheNotFile()
- public void testTransformForURLIsInCacheIsFileStrategyDuplicate()
- public void testTransformForURLIsInCacheIsFileStrategySkip()
- public void testTransformForURLIsInCacheIsFileStrategyOverwrite()
- public void testGetContentFieldsAndSelectorsNonSSType()
- public void testGetDirHierarchy()
- public void testVersionFile()
Hierarchy
Extends
- SapphireTest
Tasks
Line | Task |
---|---|
8+ | add tests that excercise duplicationStrategy() with a non-null $parentId param |
98+ | employ some proper mocking |
115+ | employ some proper mocking |
132+ | employ some proper mocking |
158+ | employ some proper mocking |
173+ | employ some proper mocking |
Members
Methods
public
- delTree()
- setUp() — Setup
- tearDownOnce() — Run once for the whole suite of StaticSiteFileTransformerTest tests
- testBuildFileProperties()
- testGetContentFieldsAndSelectorsNonSSType() — Test we get an instance of StaticSiteContentExtractor to use in custom StaticSiteDataTypeTransformer subclasses.
- testGetDirHierarchy() — Test the correct outputs for getDirHierarchy()
- testTransformForURLIsInCacheIsFileStrategyDuplicate() — Test what happens when we define what we want to do when encountering duplicates, and: - The URL represents a Mime-Type which does match our transformer
- testTransformForURLIsInCacheIsFileStrategyOverwrite() — Test what happens when we define what we want to do when encountering duplicates, and: - The URL represents a Mime-Type which does match our transformer
- testTransformForURLIsInCacheIsFileStrategySkip() — Test what happens when we define what we want to do when encountering duplicates, and: - The URL represents a Mime-Type which does match our transformer
- testTransformForURLIsInCacheNotFile() — Test what happens when we define what we want to do when encountering duplicates, but: - The URL represents a Mime-Type which doesn't match our transformer
- testTransformForURLNotInCacheIsFile() — Test what happens when we define what we want to do when encountering duplicates, but: - The URL isn't found in the cache
- testVersionFile() — Tests our custom file-versioning works correctly