Browse Source

Fix up icon defaults for fontawesome5

mscherer 5 years ago
parent
commit
d4e9e4186e

+ 1 - 1
src/View/Helper/FormatHelper.php

@@ -40,7 +40,7 @@ class FormatHelper extends Helper {
 		'yes' => 'fa fa-check',
 		'yes' => 'fa fa-check',
 		'no' => 'fa fa-times',
 		'no' => 'fa fa-times',
 		'view' => 'fa fa-eye',
 		'view' => 'fa fa-eye',
-		'edit' => 'fa fa-pencil',
+		'edit' => 'fa fa-pen',
 		'add' => 'fa fa-plus',
 		'add' => 'fa fa-plus',
 		'delete' => 'fa fa-trash',
 		'delete' => 'fa fa-trash',
 		'prev' => 'fa fa-arrow-left',
 		'prev' => 'fa fa-arrow-left',

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

@@ -81,7 +81,7 @@ class FormatHelperTest extends TestCase {
 	 */
 	 */
 	public function testIcon() {
 	public function testIcon() {
 		$result = $this->Format->icon('edit');
 		$result = $this->Format->icon('edit');
-		$expected = '<i class="icon icon-edit fa fa-pencil" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="icon icon-edit fa fa-pen" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertSame($expected, $result);
 		$this->assertSame($expected, $result);
 	}
 	}
 
 
@@ -92,7 +92,7 @@ class FormatHelperTest extends TestCase {
 	 */
 	 */
 	public function testIconWithCustomAttributes() {
 	public function testIconWithCustomAttributes() {
 		$result = $this->Format->icon('edit', [], ['data-x' => 'y']);
 		$result = $this->Format->icon('edit', [], ['data-x' => 'y']);
-		$expected = '<i class="icon icon-edit fa fa-pencil" data-x="y" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="icon icon-edit fa fa-pen" data-x="y" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertSame($expected, $result);
 		$this->assertSame($expected, $result);
 	}
 	}
 
 
@@ -101,7 +101,7 @@ class FormatHelperTest extends TestCase {
 	 */
 	 */
 	public function testIconWithCustomClassAttributes() {
 	public function testIconWithCustomClassAttributes() {
 		$result = $this->Format->icon('edit', [], ['class' => 'my-extra']);
 		$result = $this->Format->icon('edit', [], ['class' => 'my-extra']);
-		$expected = '<i class="icon icon-edit fa fa-pencil my-extra" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="icon icon-edit fa fa-pen my-extra" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertSame($expected, $result);
 		$this->assertSame($expected, $result);
 	}
 	}