\StaticSitePageTransformerTest
- Author: Russell Michell <russell@silverstripe.com>
Synopsis
class StaticSitePageTransformerTest
extends SapphireTest
{
- // members
- protected $transformer;
- public static string $fixture_file = 'StaticSiteContentSource.yml';
- // methods
- public void setUp()
- public void testTransformForURLNotInCacheIsPage()
- public void testTransformForURLIsInCacheNotPage()
- public void testTransformForURLIsInCacheIsPageStrategyDuplicate()
- public void testTransformForURLIsInCacheIsPageStrategyOverwrite()
- public void testTransformForURLIsInCacheIsPageStrategySkip()
- public void testGetContentFieldsAndSelectorsNonSSType()
Hierarchy
Extends
- SapphireTest
Tasks
Line | Task |
---|---|
8+ | add tests that excercise duplicationStrategy() with a non-null $parentId param |
36+ | employ some proper mocking |
53+ | employ some proper mocking |
71+ | employ some proper mocking |
93+ | employ some proper mocking |
93+ | the "overwrite" strategy doesn't actually work. Need to talk with implementing dev as to why not |
Members
protected
- $transformer
public
- $fixture_file
Methods
public
- setUp()
- testGetContentFieldsAndSelectorsNonSSType() — Test we get an instance of StaticSiteContentExtractor to use in custom StaticSiteDataTypeTransformer subclasses.
- testTransformForURLIsInCacheIsPageStrategyDuplicate() — 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 - We don't want to overwrite duplicates, we want to duplicate them.
- testTransformForURLIsInCacheIsPageStrategyOverwrite() — 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 - We want to overwrite duplicates
- testTransformForURLIsInCacheIsPageStrategySkip()
- testTransformForURLIsInCacheNotPage() — 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
- testTransformForURLNotInCacheIsPage() — Test what happens when we define what we want to do when encountering duplicates, but: - The URL isn't found in the cache