Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7404260
IntentEvalTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
902 B
Referenced Files
None
Subscribers
None
IntentEvalTest.php
View Options
<?php
namespace
MediaWiki\Extension\Math\WikiTexVC\Intent
;
use
MediaWiki\Extension\Math\WikiTexVC\TexVC
;
use
MediaWikiUnitTestCase
;
/**
* Test for intent validation functions and checking basic usage of the experimental
* intent annotation feature.
*
* @covers \MediaWiki\Extension\Math\WikiTexVC\TexVC
*/
final
class
IntentEvalTest
extends
MediaWikiUnitTestCase
{
public
function
testTwoArgumentApplication
()
{
$input
=
"first-derivative(
\$
a)(
\$
b)"
;
$texvc
=
new
TexVC
();
$ret
=
$texvc
->
checkIntent
(
$input
);
$this
->
assertTrue
(
$ret
);
}
public
function
testIntentShouldFailIfNotActive
()
{
$texVC
=
new
TexVC
();
$resultT
=
$texVC
->
check
(
"
\\
intent{
\\
binom{n}{k}}{intent='binomial(
\$
n,
\$
k)'}"
,
[
"useintent"
=>
false
,
]
);
$this
->
assertEquals
(
"C"
,
$resultT
[
"status"
]
);
$this
->
assertStringContainsString
(
"virtual intent package required"
,
$resultT
[
"details"
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 19:04 (1 d, 58 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
29/21/35e85a5493063cac42748e06a9b6
Default Alt Text
IntentEvalTest.php (902 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment