generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed6c4ac
commit d51c36d
Showing
8 changed files
with
130 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Html\Tests\Tag\MathML; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Yiisoft\Html\Tag\MathML\Ms; | ||
|
||
final class MsTest extends TestCase | ||
{ | ||
public function testHelloWorld(): void | ||
{ | ||
$ms = Ms::tag()->content('Hello World'); | ||
|
||
$this->assertSame('<ms>Hello World</ms>', (string) $ms); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Html\Tests\Tag\MathML; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Yiisoft\Html\Tag\MathML\Mi; | ||
use Yiisoft\Html\Tag\MathML\Msqrt; | ||
|
||
final class MsqrtTest extends TestCase | ||
{ | ||
public function testSimple(): void | ||
{ | ||
$msqrt = Msqrt::tag() | ||
->items( | ||
Mi::tag()->identifier('x'), | ||
); | ||
|
||
$this->assertSame( | ||
'<msqrt>' . "\n" . | ||
'<mi>x</mi>' . "\n" . | ||
'</msqrt>', | ||
(string) $msqrt | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Html\Tests\Tag\MathML; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Yiisoft\Html\Tag\MathML\Mi; | ||
use Yiisoft\Html\Tag\MathML\Mn; | ||
use Yiisoft\Html\Tag\MathML\Msub; | ||
|
||
final class MsubTest extends TestCase | ||
{ | ||
public function testSimple(): void | ||
{ | ||
$msub = Msub::tag() | ||
->items( | ||
Mi::tag()->identifier('X'), | ||
Mn::tag()->value(1), | ||
); | ||
|
||
$this->assertSame( | ||
'<msub>' . "\n" . | ||
'<mi>X</mi>' . "\n" . | ||
'<mn>1</mn>' . "\n" . | ||
'</msub>', | ||
(string) $msub | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Html\Tests\Tag\MathML; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Yiisoft\Html\Tag\MathML\Mn; | ||
use Yiisoft\Html\Tag\MathML\Mo; | ||
use Yiisoft\Html\Tag\MathML\Msubsup; | ||
|
||
final class MsubsupTest extends TestCase | ||
{ | ||
public function testSimple(): void | ||
{ | ||
$msubsup = Msubsup::tag() | ||
->items( | ||
Mo::tag()->operator('∫'), | ||
Mn::tag()->value(0), | ||
Mn::tag()->value(1), | ||
); | ||
|
||
$this->assertSame( | ||
'<msubsup>' . "\n" . | ||
'<mo>∫</mo>' . "\n" . | ||
'<mn>0</mn>' . "\n" . | ||
'<mn>1</mn>' . "\n" . | ||
'</msubsup>', | ||
(string) $msubsup | ||
); | ||
} | ||
} |