Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
69d20173
Unverified
Commit
69d20173
authored
5 years ago
by
Eileen McNaughton
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #14454 from eileenmcnaughton/php72
(NFC) Remove without param tests
parents
9aae955f
c8597b2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/phpunit/api/v3/SyntaxConformanceTest.php
+0
-44
0 additions, 44 deletions
tests/phpunit/api/v3/SyntaxConformanceTest.php
with
0 additions
and
44 deletions
tests/phpunit/api/v3/SyntaxConformanceTest.php
+
0
−
44
View file @
69d20173
...
...
@@ -782,28 +782,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
$this
->
assertRegExp
(
'/API (.*) does not exist/'
,
$result
[
'error_message'
]);
}
/**
* @dataProvider entities
* @param $Entity
*/
public
function
testWithoutParam_get
(
$Entity
)
{
// should get php complaining that a param is missing
try
{
$result
=
civicrm_api
(
$Entity
,
'Get'
);
$this
->
fail
(
'Expected an exception. No exception was thrown.'
);
}
// As of php7.1 a new Exception is thrown by PHP ArgumentCountError when not enough params are passed.
catch
(
ArgumentCountError
$e
)
{
/* ok */
}
catch
(
PHPUnit\Framework\Error
$e
)
{
/* ok */
}
catch
(
PHPUnit_Framework_Error
$e
)
{
/* ok */
}
}
/**
* @dataProvider entities
* @param $Entity
...
...
@@ -1594,28 +1572,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
$this
->
assertContains
(
strtolower
(
"API (
$Entity
, Delete) does not exist"
),
strtolower
(
$result
[
'error_message'
]));
}
/**
* @dataProvider entities
* @param $Entity
*/
public
function
testWithoutParam_delete
(
$Entity
)
{
// should delete php complaining that a param is missing
try
{
$result
=
civicrm_api
(
$Entity
,
'Delete'
);
$this
->
fail
(
'Expected an exception. No exception was thrown.'
);
}
// As of php7.1 a new Exception is thrown by PHP ArgumentCountError when not enough params are passed.
catch
(
ArgumentCountError
$e
)
{
/* ok */
}
catch
(
PHPUnit\Framework\Error
$e
)
{
/* ok */
}
catch
(
PHPUnit_Framework_Error
$e
)
{
/* ok */
}
}
/**
* @dataProvider entities_delete
* @param $Entity
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment