Commit graph

189 commits

Author SHA1 Message Date
Umherirrender a72741e313 Use Maintenance::addDescription
It is better to use a setter function than setting a property

Change-Id: I1df2d03cfaede53867daf9db8e26af5931c77ef9
2019-08-19 19:59:17 +02:00
libraryupgrader ccc6a0cb48 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 24.0.0 → 26.0.0

npm:
* set-value: 2.0.0 → 2.0.1
  * https://npmjs.com/advisories/1012
  * CVE-2019-10747
* union-value: 1.0.0 → 1.0.1
  * https://npmjs.com/advisories/1012
  * CVE-2019-10747
* mixin-deep: 1.3.1 → 1.3.2
  * https://npmjs.com/advisories/1013
  * CVE-2019-10746

Change-Id: Id7c540a37118f3a89917f467dcb715f504b843ef
2019-07-14 13:30:34 +00:00
Lucas Werkmeister 7abf09a4aa Update for namespace moves
Change-Id: I300aff6fa8e9f2ade8a97c826ef23ad56d40b392
Depends-On: Ie808d49aed00ec97117b04722456f24e96d49e68
2019-06-07 18:01:03 +02:00
Tpt d51e0ae06a Make error HTML valid XHTML
Allows easy parsing using XML tools

Change-Id: I27b5a8b719d703636c2c09d513cd04766fc66ce1
2019-04-24 12:06:14 +02:00
Umherirrender 328e2f2c3b Use ::class for class name resolution
Available since php5.5

Change-Id: Ib2a249e81f4039d015f12ebcce04326c847c7b13
2019-03-08 19:11:50 +00:00
libraryupgrader 54d1b77401 build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
Change-Id: I30daab715920757ec96350c9933fc18c887972c4
2019-02-06 23:08:22 +00:00
Ed Sanders 5f7f535c28 Update eslint-config-wikimedia to 0.9.0
Change-Id: I4c7dcb1b3cd3d03e3ea3d1e17bfcf63f3b553e50
2018-11-30 21:08:28 +00:00
Ed Sanders cf33c80b98 eslint: Use in all folders (including tests/selenium)
Change-Id: I0ab0a9f99817077934e7569d19d76735c33678e9
2018-11-12 17:08:22 +00:00
AndreG-P 2699479827 Link wikidata items to math tags
Adds a parameter that links individual formulae to their respective wikidata items.

Bug: T71424
Change-Id: I32cfe2039e62f163fe3aebaf77bafbdd84b343c6
2018-11-12 20:59:25 +09:00
jenkins-bot 817ada2cf1 Merge "Add tracking category for deprecated mhchem syntax" 2018-11-09 12:19:12 +00:00
Umherirrender d37698535a Add method scope visibility
Change-Id: I6b8e90017c9862fc082b216d44bebab34f3a6095
2018-11-02 18:52:06 +01:00
Moritz Schubotz (physikerwelt) a865a8565a
Add tracking category for deprecated mhchem syntax
Gets warning information from restbase and adds tracking categories
for deprecated chemical syntax.
Refactor mechanism to add tracking categories, and avoiding rechecking
already checked formulae.

Depends on: Ieca66f45ae7685d61eece1624bd7ff65ccad2eaa
Change-Id: I10e78ab79015dc1331f645c60b25bbbd237e23fe
2018-10-27 20:38:02 +02:00
Jakob Warkotsch b8153d0d24 Ensure database tests run as part of --group Database
The comments behind @group Database prevented the tests from being run
as part of the --group Database phpunit jobs.

Bug: T202223
Change-Id: I8dc68d3d90502fa7bd691cf18f0e296d97d3c893
2018-09-06 11:49:07 +00:00
Moritz Schubotz (physikerwelt) f0c8840148
Add math related styles and script via appropriate hook
Create MathDataUpdater class that checks if statements
are using math and adds the stlyes required for math in that case.

This patch has no effect until
I5bc0622ee7338f3215d14e15331a0a1931ca1ae0
is merged.

After both changes are in effect
I0abd6acbfa12fd503d11476f0c8c8c8a8a851cdc
can be merged.

Bug: T173949
Change-Id: I0e24bbb53e6e01d549f534744780ca1afc49fdd7
2018-07-24 16:40:52 +02:00
Thiemo Kreuz 97000ed8b0 Fix "@param $…" missing the type
Change-Id: I8d20ae852100a6ecc39df05eab3aa8e2b9c09480
2018-06-20 11:10:43 +02:00
Moritz Schubotz (physikerwelt) 9a04cd6de3
Improve test coverage for MathSource
Change-Id: I82d76db4b087b6472c2856806c70f4ef1ffbc8df
2018-06-08 16:25:11 +02:00
jenkins-bot ec99401072 Merge "Make use of the …::class feature whenever possible" 2018-06-06 12:24:31 +00:00
Moritz Schubotz (physikerwelt) e359eafe6c Improve tests coverage for MathPng
Change-Id: Ibb5138512afd20304983be44e0ab45a244634b4b
2018-06-06 10:30:53 +00:00
Thiemo Kreuz 5648b8e2c3 Make use of the …::class feature whenever possible
Note that a class is not resolved this was. …::class is not a function
call. It's more like a named string constant. Technically still a
string. The advantage is that IDEs and tools like linters can much easier
understand that these strings refer to a class, and list them in usage
reports, renames, and such.

Change-Id: I5225543dbb837685a1840837cb2772dd576cca38
2018-06-06 12:13:04 +02:00
Moritz Schubotz (physikerwelt) aa2c4cf913 Improve tests coverage for MathMathML
* deprecate and fix pickHost. It was broken and never used.
* simplify inputTypeSelection
* remove superfluous is_array check for the result of explode

Change-Id: I392f22f074facfe30b97d53a3002f464a471b67e
2018-06-01 15:36:35 +00:00
Moritz Schubotz (physikerwelt) c1c4e42c86 Improve tests coverage for MathFormatter
Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631
2018-06-01 14:45:04 +00:00
Moritz Schubotz (physikerwelt) 4156f1c9b7
Remove dead texvc code from the math extension
In T74240 support for LaTeX based rendering of the <math/>-tags was
removed. This change eliminates the unused code from the repository.

Bug: T195871
Change-Id: Ic57d83fa49f090b574ce8b82fd2ebc84a5350318
2018-05-29 17:41:53 +02:00
Željko Filipin 88e9149e3e Delete Selenium tests in Ruby
They are replaced by Selenuium tests in Node.js.

Bug: T162455
Change-Id: I1f5bc8f9c5cd687a6ba116f2f0461eb2992096c7
Depends-On: Ibd8a39cc75231932f872456b8d3ec1fe41ef23e2
2018-05-25 05:58:17 +00:00
jenkins-bot 5581b9779a Merge "Selenium tests for Math" 2018-05-24 16:14:52 +00:00
Moritz Schubotz (physikerwelt) b5cf0e0b77
Serve png mode from mathoid
* Use the exactly same routines to deliver png images that are used in
  mathml mode.
* Change the output to use mathoids png image rather than the mathml
  and svg output.
* Locally tested on Firefox and Chrome: Depending on the mode either
  the SVG or the PNG path is used.

Bug: T74240
Change-Id: I4b1cac92eb9a02190f316faab6621940951603d5
2018-05-21 13:47:49 +02:00
Željko Filipin befe4af465 Selenium tests for Math
* Implement a basic tests that renders $2+3$

Bug: T162455
Change-Id: Ic605bd0d934d0f138390145fa5f5bddaa8f8e578
2018-05-19 17:04:22 +00:00
Thiemo Kreuz b12b4f740f Throw InvalidArgumentException when validating/formatting null
Change-Id: Ia46f76a89b26c830aab70ebf5fcc222711c325d1
2018-05-18 20:02:43 +02:00
Kunal Mehta 7a53bd905c Disable PHPCS more narrowly
Change-Id: I20d8b519d5827e865ccd3adf7c2c6ba069f37afb
2018-05-03 19:00:55 -07:00
Moritz Schubotz (physikerwelt) 88546ae1ad
Move phpunit test files
* currently the phpunit tests are not triggered by jenkins
* some test can't be re-enabled possible reasons:
** the texvc and texvccheck binaries are not available from jenkins
** the binaries can not be generated
** the path to the binaries are not set up correctly

Bug: T142120
Change-Id: I0c8fe5ad652c4663eeb029781521acbf56e42bad
2018-04-22 10:09:12 +02:00
Jayprakash12345 270b942c64 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I2fe982bc146355d7faec03e39a2a59e9d32e22be
2018-04-13 17:37:23 +00:00
jenkins-bot 0a8608399a Merge "Fix MathFormatter failing on new SnakFormatter format MIME types" 2018-04-13 16:11:03 +00:00
Thiemo Kreuz 1f87afa8e6 Fix MathFormatter failing on new SnakFormatter format MIME types
A formatter like this is not supposed to check if the format is known
or not. The code calling these formatters can introduce new (sub) formats
any time. What a formatter like this should do then are two things:
* If it's some HTML format, always return HTML.
* If you really can't identify the format, do a sensible fallback.

This currently blocks introducing a new format in Wikibase.

Bug: T46727
Change-Id: I585069e8f2ba33ec657ca4d514c6d502fe0f5ba3
2018-04-13 14:46:58 +00:00
jenkins-bot 3291177420 Merge "Use "@license GPL-2.0-or-later" according to SPDX" 2018-04-13 14:21:44 +00:00
jenkins-bot 04e17f7e1e Merge "Remove non-helpful comments" 2018-04-13 14:09:33 +00:00
Thiemo Kreuz 945ef79559 Use "@license GPL-2.0-or-later" according to SPDX
Change-Id: I5b9ba062f51dce9fcc10f7c31f37c137176bfff3
2018-04-13 16:07:10 +02:00
Thiemo Kreuz 920ca42c59 Remove insonsistent "@ingroup Extensions" tag
This is obviously copy-pasted from somwhere else. Note that this tag
only appears in these two files. No other file does have it. It's not
useful for anything this way.

Change-Id: I7e0dcf0594fb59b396b1fd26b13383d59227b3f9
2018-04-13 15:33:41 +02:00
Thiemo Kreuz 3f0398e031 Remove non-helpful comments
Documenting protected members as protected members is not really helpful.
One can see this by looking at the code.

Same for documenting a variable named "$html…" as "HTML". This does not
add anything.

Change-Id: I72364b6857166d77b9c85aa884cd139dc163c6bb
2018-04-13 15:32:05 +02:00
libraryupgrader 5a076f94aa build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment

Change-Id: Ia8000677263c4150d4900526bcba1c0602664b8e
2018-03-29 03:44:44 +00:00
Umherirrender 43b187e6fd Move @covers closer to test class
Change-Id: I25987f180c134b53f7ade3e2a2225328f5b088a8
2018-03-10 12:20:29 +00:00
Moritz Schubotz d8822169ab
Mathoid CLI interface
Renders formulae via mathoid without to run mathoid as a service.
Mathoid 0.7.1 or later must be installed locally and configured to be
accessed directly from the math extension. It has been tested with the
config.dev.yaml of version 0.7.1. If mathoid is installed in
'/srv/mathoid' the following line might be added to LocalSettings.php
$wgMathoidCli = ['/srv/mathoid/cli.js', '-c', '/srv/mathoid/config.dev.yaml'];
i.e., make sure to specify the -c parameter with an absolute path.
In addition mathoid uses more memory than the the default. With
the config.dev.yaml a value of
$wgMaxShellMemory = 2097152;
has been tested to work well.

Change-Id: I0600f056d21927963267cf979d342e313419e9fa
2018-02-21 20:29:20 +01:00
Moritz Schubotz (physikerwelt) 26e9f00c2a
Fix broken links in phpunit covers annotations
Phpunit now checks if the coverage annotations are reasonable.

This fix corrects unresolvable references in phpunit covers annotations.

Change-Id: I7eba10bd7dc445b175df750465bb80bd5ef0f4c6
2018-02-05 16:24:46 +01:00
Umherirrender 13d43ec6be Rename files to match classes
Change-Id: Iecf3ea2d0e7ec3dc0f743a3d1a8d85463939d19d
2017-12-10 12:42:41 +01:00
libraryupgrader bc0b7ee838 build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound

Change-Id: Ia2c06ebe33acefdf03625d86d98bf0dbaf826c4c
2017-09-01 04:53:09 +00:00
Kunal Mehta df1689c717 build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
Change-Id: I8ce8155621fbfc5cb3dcf5dafbfa89796d0c1f11
2017-08-10 23:57:43 -04:00
Umherirrender 2bbb86b868 Improve some parameter docs
Change-Id: If7d52d77935b7dd6cddd583b9a6215735fa8b91e
2017-08-09 22:56:19 +02:00
Thiemo Mättig bdeec56d1f Fix and add missing documentation and fix minor code smell issues
Change-Id: Ifa2f8a47fbd0bdd20334f59dd06a21339b9a4292
2017-07-10 11:40:12 +02:00
Kunal Mehta fbd17b4fef build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.DuplicateReturn
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I46c900a5652a6560d18be6cd67badc37ed7f8d97
2017-06-21 00:59:25 +00:00
Moritz Schubotz f5fdda0ba1 Improve error reporting
Display error message in the UI,
if the check command passes,
but the mml/svg/complete endpoints returns an valid json error.

Bug: T143225
Change-Id: I50776926e42f75a2c1e30fc9afe08baae3fcdbd1
2016-08-17 21:15:02 +02:00
Željko Filipin 61abb07b5d Fix Watir::Wait::TimeoutError in Selenium tests
Bug: T137711
Change-Id: I9aeb9d4c38bff31bdc2f248b74b6797a4e518f3d
2016-06-13 17:03:40 +02:00
Željko Filipin c4636667d4 Fix Cucumber scenario that is broken in daily Jenkins jobs
"Welcome to Wikipedia" popup broke the scenario.

Bug: T94150
Change-Id: I5d3b41b8f3060f6edc41a5afe2c992fc6faca4e7
2016-05-16 18:11:59 +02:00
Željko Filipin d2ff0ef699 Fixed broken Selenium test
The test is broken on beta cluster because the formula is rendered as
meta tag. It is rendered at img tag on my mediawiki-vagrant virtual
machine. The test now works on both environments.

Bug: T128190
Change-Id: I458d618af24533d104fcac25a8d8c6468b14605a
2016-04-26 19:07:49 +02:00
jenkins-bot 462178f320 Merge "Migration of browsertests* Jenkins jobs to selenium* jobs" 2016-04-25 17:05:39 +00:00
Željko Filipin 7bc7a0cabf Migration of browsertests* Jenkins jobs to selenium* jobs
selenium* jobs are a new way of running Ruby based Selenium tests. The
jobs are triggered daily.

Bug: T128190
Change-Id: Ide349ea15e0c38ff9f61d348abd61cd2349a83f6
2016-04-25 18:31:00 +02:00
physikerwelt 6b984122a1 Ensure use of ; to seperate svg styles
It was reported that under certain circumstances a semicolon was
missing from the SVG style.

Bug: T132563
Change-Id: I148433657848fdc74889fcaf6d883078c46a4006
2016-04-21 08:55:21 +00:00
physikerwelt 6f7bcaf2c6 Update to mediawiki-codesniffer 0.6.0
Change-Id: I2a1a74c771bc00f6c1569568dfcf474f06714426
2016-04-19 17:07:21 -04:00
physikerwelt 6699724d65 Convert all array() syntax to []
Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Change-Id: I1d2604e3f246ede58ff8245ba2b940f258d2d80c
2016-04-13 10:18:23 -04:00
physikerwelt 31cd0d611a Insert MathML content after tidy
* BeforeTidy caused problems when math tags were used
  within links.

Bug: T130508
Change-Id: Icb9b88a7552d14231f96cbfd2b3cf3fa7e29276d
2016-03-24 13:31:15 +00:00
daniel 7018e85b7d Show TeX in wikibase diffs.
Diffs should show the rendered output as well as the TeX source,
so changes that do not affect the output noticably can still be
assessed by looking at the diff.

Bug: T125712
Change-Id: I098d30ea3158ec34723bfca313cf2bcc4cbc591f
2016-02-25 12:59:12 +01:00
Željko Filipin a4948c208a Fixed failing Selenium test
When user is logged in, visual editor is the default editor. When user
is not logged in, source editor is the default editor. When the test
does not log in, everything works just fine.

Bug: T126463
Change-Id: I1f15000a275657c0a92172781f57c5d1db537dcc
2016-02-22 09:51:24 +00:00
physikerwelt 9e605e09cd Render all math tags in parallel
Bug: T125543
Change-Id: Ia2febf2c0309e5de514445ad2aad58b7e5ce6837
2016-02-18 02:25:38 +00:00
Željko Filipin 11825b9c17 Fixed broken Selenium test
The problems was that visual editor is the default editor at
en.wikipedia.beta.wmflabs.org, and the test was expecting source editor.

The test now works also locally, using mediawiki-vagrant.

Removed headers from some files. We no longer use those headers.

Removed cucumber tags we no longer use, mostly internet explorer.

Added missing dependency (rake) to gemfile.

Bug: T126463
Change-Id: Ia5809f40719a2fe0c6c94338072a38765fa5c87b
2016-02-15 12:50:48 +00:00
physikerwelt 5f16307582 RDF Formatter for Math data type
Bug: T126349
Change-Id: I15fbeec282868b4267a3e3d15740f2c3ff37ea48
2016-02-12 20:38:27 +00:00
Thiemo Mättig 129f0e4bcc Add more complete PHPDoc tags to all tests
... and remove some actual copy-paste mistakes.

Change-Id: Id2fd83edff774a7f07b0f5436cefe2bf5c0a63f0
2016-02-12 17:57:37 +01:00
physikerwelt 47f530b355 Support for chemical formulae
* Add support for LaTeX package mhchem.
* Add hook <ce>
* Add format <math chem>

See bug description for the details.

Bug: T98306
Change-Id: I2ab80834edc5d071618bc52f133cfb2b7ece5016
2016-02-07 18:55:58 +00:00
Thiemo Mättig 8b8d91a771 Clean up Wikibase related code
This fixes some warnings in my PHPStorm, gets rid
of duplicate code, inlines constants that do not
make the code easier to read, and more.

Change-Id: I02f446491509043f5d3e51e26e932f76c9ecb6cf
2016-01-25 16:22:07 +00:00
lyrianos93 946a18d14c Implement datatype 'Math' for Wikidata
This change implements all components to use the datatype 'Math' in Wikidata.
Because 'String 'is used as value type, only the Formatter and Validator are needed to be implemended.

The components are:
* hooks
* Formatter class
* Validator class
* Test cases

Bug: T67397
Change-Id: Ic64fd6c8560f48052e2db24ae1f013d48a82b5e9
2016-01-11 22:29:29 +00:00
Željko Filipin 30fd1cb9b3 Update mediawiki_selenium Ruby gem to the latest version
Bug: T114241
Change-Id: I81a6727fba46a0c9a628c0718e6159cfc8846c22
2015-12-17 12:58:34 +01:00
jenkins-bot dd06d7ed94 Merge "browser test: fix logic to find edit action" 2015-12-15 09:22:44 +00:00
Marko Obrovac c3ebc54994 Minor: rename checkTex() to checkTeX()
Change-Id: I9b1860562b2f4f2112b68c0c3d6f0390f0405fbe
2015-12-14 23:58:08 +01:00
Antoine Musso 0cebe64840 browser test: fix logic to find edit action
The simple math test failed to find the edit link on a non existent
page. It was looking for the text 'Create source' from Vector which is
now simply 'Create'.

Change the PageObject selector to use a CSS selector, more robust to
text changes.

Change-Id: Ifcbd07da8e343b5697fcff6af6ffac90ff4d6420
2015-12-14 21:24:13 +01:00
physikerwelt 897afa480b Use RestBase to check input tex rather than texvccheck
* This will increase the performance of tex rendering for all
 rendering modes since no shell access is required anymore.

 Merge with caution. If the connection to restbase fails, rendering
 of new formulae will be completely disabled i.e. broken.

Change-Id: I1982612e8c6a356e3dbdf447724ac82e5968cc77
2015-12-03 09:03:43 +00:00
physikerwelt f63eaeac23 Restbase based texvc input check
This change only connects the restbase and the mathinput interfaces
but does not change any functionality.

Change-Id: I3a23e5008c26c5f14ad842dcb5d22906a8aff33c
2015-12-03 08:56:47 +00:00
physikerwelt c66a85f143 Fix error in checking logic
Tex validation should be skipped if checking is disabled.
Consequently if 'disable tex filter' is set to 'never' it's a double
negation and tex should always be checked.
If 'disable tex filter' is set to always, never check tex.

Change-Id: Ic6fda8016838eae03a0ed36e3d8d4f35423ba8b1
2015-12-03 08:30:24 +01:00
physikerwelt 6ef2e56439 Add Restbase interface
* Add a simple interface to Restbase that currently
  does not do anything.

Change-Id: I4c2ef329b3954fd35276a5e270d0dc3fcacabf7b
2015-12-01 21:10:09 +00:00
paladox df8ad1c799 Add php code sniffer to composer
Add support for php code sniffer

Change-Id: I7dcdd88be4f1f8219f71ab770979284761e09bae
2015-09-23 10:46:14 +01:00
Željko Filipin 646fc8e94b Fixed Style/StringLiterals RuboCop offense
Bug: T111184
Change-Id: Ia51f271b5e06d7bbd9896634b832003d57c30900
2015-09-22 10:18:13 -07:00
Željko Filipin 2bda4398f4 Fixed Style/SpaceInsideHashLiteralBraces RuboCop offense
Bug: T111184
Change-Id: I77573a78136dc9a8fd6f8b7364e23c8bf6db5e7f
2015-09-22 10:18:13 -07:00
Željko Filipin 4e4baedb2b Fixed Style/SpaceAroundOperators RuboCop offense
Bug: T111184
Change-Id: I442e5be94459d5a8bb497edad9fca900c4066ba1
2015-09-22 10:18:13 -07:00
Željko Filipin f85439cce9 Upgrade browser tests to use mediawiki_selenium 1.x
Bug: T99656
Change-Id: Ie170d38082d7441df8014ae97f1be820e21871fd
2015-09-22 10:18:13 -07:00
physikerwelt bc52c77d24 Use extension.json, empty PHP entry point
* Use string constants instead of integers
* Derive new names from old via conversion of constant
  naming convention to CamelCase.
* Replace old constant string e.g. 'MW_MATH_ABC_DEF'
  with new string 'abcDef'
* Replace old constant value with new string.
* Tests to demonstrates what is actually done.
* Rename constants

Bug: T106630
Bug: T106631
Bug: T87941
Change-Id: I6d1094ece79e912d9ddbef6681a25196c7a6e801
2015-07-30 22:01:20 +00:00
physikerwelt 5c12ed983f Remove useless debug functionality
* MathDebug was intended to provide advanced debugging functionality
  for the math extension. However, the interesting debugging and
  logging feature never made it from the debug branch to the master.
* The current debug functionality is mostly useless. Only some values
  are written to memory and never used thereafter.
* This change moves the existing functionality to the MathSearch
  extension and introduced the required hook for that.

Details:
* $wgMathDebug is removed
* A new Hook MathRenderingResultRetrieved is created
* The math rendering object is printed to the svg error
  page if wgDebugComments is active (instead of wgMathDebug)

Change-Id: I6fad69b5d9b9ca8a7d12c7e410d3ae6180fbddbf
2015-07-14 10:34:37 -04:00
physikerwelt (Moritz Schubotz) 6889086753 Move integration tests to a new special page
The integration tests depend on the presence of external servers
and the user settings.
First, people are bothered by  failing test due to problems with
those servers and second, administrators need to run phpunit tests
to verify the configuration settings.
Therefore, we move the integration tests to a special page.

Bug: T87389
Change-Id: If66f13fe7fa16868cd4b1d8f0e0a6e3d49448b27
2015-03-30 11:47:31 -04:00
Bryan Davis 81dbee82c9 Fix PHPUnit provider name
MathCoverageTest::testProvider -> MathCoverageTest::provideCoverage

'test*' reserved for PHPUnit tests and have to make assertions.

Change-Id: If46684eb27a2282b4cd6261bd0a19dba9bc20e27
2015-03-18 17:16:27 +00:00
Kunal Mehta 5a50bb312c Remove U+FEFF before opening <?php tag
Change-Id: Ib2f1a75f4a3b5879809243cf43124bf3ebf83127
2015-03-12 11:50:11 -07:00
jagori 197bd9ccd6 Refactor code for RSpec3 expect syntax incorporation
Bug: T68369
Change-Id: I25e27d8b363957c4217eaf8516d3c9e61ece156e
2015-02-08 18:52:38 +00:00
Timo Tijhof 83da0338ec Minor clean up, optimisations and documentation corrections
* Handle-error-first approach for consistent function body
  termination at the root with the main intend, and less indention.

* __DIR__ instead of dirname( __FILE__ )

* Single quotes.

* Correct pickHost documentation: wgMathMathMLUrl is not an array,
  and is not used in this method, that's at a different level
  of abstraction (via the constructor).

* White spacing.

* require_once is not a function.

Change-Id: Id4bec8415893245e2569a39ab5406a0820238ae4
2015-01-22 10:56:16 -08:00
physikerwelt (Moritz Schubotz) 056e85afe6 Update LaTeXML test
* The LaTeXML server was updated. In the new version unneccary id's
  have been removed.

Change-Id: I25927912f1500ebfe6d61505c0e06ae2c24d6f6a
2015-01-15 11:13:40 +01:00
physikerwelt (Moritz Schubotz) fd8eb448a3 Update MathParser tests
In the most recent version of ubuntu14 the outputhash of the
png images for some math objects has changed.
However, the rendered images seem to look ok.

Bug: T86309
Change-Id: I52dbdefdcfa19c10f1d9d1a43369aabe8bfd92bf
2015-01-10 14:54:03 +00:00
Ori Livneh d9b9b06032 MWException -> Exception
Change-Id: I18da1baeb70387b96e30811a049185a264dec26d
2015-01-09 17:55:54 -08:00
physikerwelt (Moritz Schubotz) 7c5ce98bfa Fix Mathoid integration test
A recent change in mathoid, i.e. 
I8d3cec0ee8a8c9368b7dca89e1d5e0c5683f946c 
removed the margins. This causes breaking unit tests.

Change-Id: I312d6226c6f24c84254b99ee6292564a421133c3
2014-11-24 19:16:04 +00:00
Željko Filipin ce58cbc738 Prepare repository for running RuboCop after every push to Gerrit
For now ignoring all problems.

Bug: 69245
Change-Id: Id1164187eddc6dcb006ca771d62ca867677213f9
2014-10-21 15:04:22 +02:00
Reedy 672df7dcc8 Fix file permissions
Bug: 71941
Change-Id: I7b0eddc0ca679cf233ef29dcdfeca024ecc71d38
2014-10-15 12:16:20 +00:00
Frédéric Wang 3d0b787cbe Move vertical-align back to ext.math.css
This improves If8ee1cf6453257a0a2f6aa186d4007954a8e5d8e

Change-Id: I794b39a5d322a92d9f722ded790e213803448127
2014-10-12 18:22:06 +00:00
C. Scott Ananian 7914fbea61 MathCoverageTest: encode test file using JSON instead of PHP serialize.
This ensures that changes to the test inputs or outputs yield readable
diffs when reviewing.

Change-Id: I7b4ef8102ad7fbf7c289a27db60f304a140b93a5
2014-10-12 18:02:50 +00:00
Frédéric Wang 61a3d9c719 Merge "Revert "Disable failing latexml integration tests"" 2014-10-11 17:20:00 +00:00
Physikerwelt 2a20654ab9 Revert "Disable failing latexml integration tests"
This reverts commit 4c544f002b.

Change-Id: Ifafb5782e10e80240a282beb449ab069ad93c37f
2014-10-11 19:17:29 +02:00
physikerwelt (Moritz Schubotz) ccc4114812 Fine grained options for wgMathDisableTeXFilter
Add new option to filter only new input.
Now the complete list of possible settings is:
MW_MATH_CHECK_ALWAYS  backwards compatible to false
MW_MATH_CHECK_NEVER   backwards compatible to true
MW_MATH_CHECK_NEW     new option

Change-Id: I455b41c8b8d918f4c34f6c115194d227a8394e0a
2014-10-10 18:27:04 +00:00
Gabriel Wicke 4c544f002b Disable failing latexml integration tests
Change-Id: Ib0ea79155f87f036464756b3d303048f8df84897
2014-10-08 17:45:24 -07:00
physikerwelt 21c89c22b1 tests: Add missing parent::tearDown() call
Follows-up 6a0af8f3b4.

Change-Id: I9418205479053c4129b6a9b888e38150799edcc5
2014-09-16 00:50:30 +00:00
Cmcmahon c31fe814be QA: update to fix deprecated API token call
Change-Id: I8654964a86c1154a6c7b14fc46235da5738a0985
2014-08-27 16:28:40 +00:00