diff --git a/src/Helper/Scripts.php b/src/Helper/Scripts.php
index d024e78..b20b27a 100644
--- a/src/Helper/Scripts.php
+++ b/src/Helper/Scripts.php
@@ -88,7 +88,7 @@ public function addCond($cond, $src, $pos = 100, array $attr = array())
public function addInternal($script, $pos = 100, array $attr = array())
{
$attr = $this->attr(null, $attr);
- $tag = "";
+ $tag = $attr ? "" : "";
$this->addElement($pos, $tag);
return $this;
}
@@ -109,7 +109,7 @@ public function addCondInternal($cond, $script, $pos = 100, array $attr = array(
{
$cond = $this->escaper->html($cond);
$attr = $this->attr(null, $attr);
- $tag = "";
+ $tag = $attr ? "" : "";
$this->addElement($pos, $tag);
return $this;
@@ -186,7 +186,6 @@ protected function attr($src = null, array $attr = array())
if (null !== $src) {
$attr['src'] = $src;
}
- $attr['type'] = 'text/javascript';
return $this->escaper->attr($attr);
}
}
diff --git a/src/Helper/Styles.php b/src/Helper/Styles.php
index 5018473..8768699 100644
--- a/src/Helper/Styles.php
+++ b/src/Helper/Styles.php
@@ -245,7 +245,6 @@ protected function fixAttr($href, ?array $attr = null)
$base = array(
'rel' => 'stylesheet',
'href' => $href,
- 'type' => 'text/css',
'media' => 'screen',
);
diff --git a/tests/Helper/ScriptsTest.php b/tests/Helper/ScriptsTest.php
index 5c988fd..45f9902 100644
--- a/tests/Helper/ScriptsTest.php
+++ b/tests/Helper/ScriptsTest.php
@@ -14,7 +14,7 @@ public function test__invoke()
$this->assertInstanceOf('Aura\Html\Helper\Scripts', $actual);
$actual = $scripts('script.js')->__toString();
- $expect = ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
}
@@ -31,11 +31,11 @@ public function test()
$actual = $scripts->__toString();
- $expect = ' ' . PHP_EOL
- . ' '. PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL
+ . ' '. PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
}
@@ -57,10 +57,10 @@ public function testInternal()
$actual = $scripts->__toString();
- $expect = ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
diff --git a/tests/Helper/StylesTest.php b/tests/Helper/StylesTest.php
index cfa0844..68a5ae7 100644
--- a/tests/Helper/StylesTest.php
+++ b/tests/Helper/StylesTest.php
@@ -14,7 +14,7 @@ public function test__invoke()
$this->assertInstanceOf('Aura\Html\Helper\Styles', $actual);
$actual = $styles('style.css')->__toString();
- $expect = ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
}
@@ -28,10 +28,10 @@ public function testAddAndGet()
$styles->addCond('ie6', '/css/ie6.css');
$actual = $styles->__toString();
- $expect = ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
}
@@ -47,10 +47,10 @@ public function testSetIndentAndAttribs()
$styles->addCond('ie6', '/css/ie6.css', array('media' => 'print'));
$actual = $styles->__toString();
- $expect = ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
}
@@ -72,10 +72,10 @@ public function testInternal()
$actual = $styles->__toString();
- $expect = ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL
- . ' ' . PHP_EOL;
+ $expect = ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL
+ . ' ' . PHP_EOL;
$this->assertSame($expect, $actual);
}