@@ -15,12 +15,12 @@ class ThemeProviderTest extends \PHPUnit_Framework_TestCase
15
15
/**
16
16
* @var ThemeProvider
17
17
*/
18
- private $ themeProvider1 ;
18
+ private $ themeProviderOne ;
19
19
20
20
/**
21
21
* @var ThemeProvider
22
22
*/
23
- private $ themeProvider2 ;
23
+ private $ themeProviderTwo ;
24
24
25
25
/**
26
26
* @var ThemeCollection
@@ -30,8 +30,8 @@ class ThemeProviderTest extends \PHPUnit_Framework_TestCase
30
30
protected function setUp ()
31
31
{
32
32
$ objectManager = Bootstrap::getObjectManager ();
33
- $ this ->themeProvider1 = $ objectManager ->create (ThemeProvider::class);
34
- $ this ->themeProvider2 = clone $ this ->themeProvider1 ;
33
+ $ this ->themeProviderOne = $ objectManager ->create (ThemeProvider::class);
34
+ $ this ->themeProviderTwo = clone $ this ->themeProviderOne ;
35
35
$ this ->themeCollection = $ objectManager ->create (ThemeCollection::class);
36
36
CacheCleaner::clean ();
37
37
}
@@ -40,9 +40,14 @@ public function testGetThemeById()
40
40
{
41
41
/** @var Theme $theme */
42
42
foreach ($ this ->themeCollection as $ theme ) {
43
+ $ theme = $ this ->themeProviderOne ->getThemeById ($ theme ->getId ());
43
44
$ this ->assertSame (
44
- $ this ->themeProvider1 ->getThemeById ($ theme ->getId ())->getData (),
45
- $ this ->themeProvider2 ->getThemeById ($ theme ->getId ())->getData ()
45
+ $ theme ,
46
+ $ this ->themeProviderOne ->getThemeById ($ theme ->getId ())
47
+ );
48
+ $ this ->assertSame (
49
+ $ theme ->getData (),
50
+ $ this ->themeProviderTwo ->getThemeById ($ theme ->getId ())->getData ()
46
51
);
47
52
}
48
53
}
@@ -51,9 +56,14 @@ public function testGetThemeByFullPath()
51
56
{
52
57
/** @var Theme $theme */
53
58
foreach ($ this ->themeCollection as $ theme ) {
59
+ $ theme = $ this ->themeProviderOne ->getThemeByFullPath ($ theme ->getFullPath ());
60
+ $ this ->assertSame (
61
+ $ theme ,
62
+ $ this ->themeProviderOne ->getThemeByFullPath ($ theme ->getFullPath ())
63
+ );
54
64
$ this ->assertSame (
55
- $ this -> themeProvider1 -> getThemeByFullPath ( $ theme-> getFullPath ()) ->getData (),
56
- $ this ->themeProvider2 ->getThemeByFullPath ($ theme ->getFullPath ())->getData ()
65
+ $ theme ->getData (),
66
+ $ this ->themeProviderTwo ->getThemeByFullPath ($ theme ->getFullPath ())->getData ()
57
67
);
58
68
}
59
69
}
0 commit comments