Browse Source

Fix material icon generation.

mscherer 3 years ago
parent
commit
9b4e30f83e

+ 1 - 1
src/View/Icon/MaterialIcon.php

@@ -44,7 +44,7 @@ class MaterialIcon implements IconInterface {
 		];
 
 		$options['name'] = $icon;
-		$options['class'] = 'material-symbols-outlined';
+		$options['class'] = 'material-icons-outlined';
 		if (!empty($attributes['class'])) {
 			$options['class'] .= ' ' . $attributes['class'];
 		}

+ 3 - 3
tests/TestCase/View/Helper/IconHelperTest.php

@@ -54,7 +54,7 @@ class IconHelperTest extends TestCase {
 	 */
 	public function testIconWithCustomAttributes() {
 		$result = $this->Icon->render('m:save', [], ['data-x' => 'y']);
-		$expected = '<span class="material-symbols-outlined" data-x="y" title="Save">save</span>';
+		$expected = '<span class="material-icons-outlined" data-x="y" title="Save">save</span>';
 		$this->assertSame($expected, $result);
 	}
 
@@ -63,7 +63,7 @@ class IconHelperTest extends TestCase {
 	 */
 	public function testIconWithCustomClassAttributes() {
 		$result = $this->Icon->render('m:save', [], ['class' => 'my-extra']);
-		$expected = '<span class="material-symbols-outlined my-extra" title="Save">save</span>';
+		$expected = '<span class="material-icons-outlined my-extra" title="Save">save</span>';
 		$this->assertSame($expected, $result);
 	}
 
@@ -84,7 +84,7 @@ class IconHelperTest extends TestCase {
 		$this->Icon = new IconHelper(new View(null), $config);
 
 		$result = $this->Icon->render('edit');
-		$expected = '<span class="material-symbols-outlined" title="Save">save</span>';
+		$expected = '<span class="material-icons-outlined" title="Save">save</span>';
 		$this->assertSame($expected, $result);
 	}
 

+ 1 - 1
tests/TestCase/View/Icon/MaterialIconTest.php

@@ -26,7 +26,7 @@ class MaterialIconTest extends TestCase {
 	 */
 	public function testRender(): void {
 		$result = $this->icon->render('view');
-		$this->assertSame('<span class="material-symbols-outlined">view</span>', $result);
+		$this->assertSame('<span class="material-icons-outlined">view</span>', $result);
 	}
 
 }