Merge pull request #228 from creative-commoners/pulls/4/deprecated

API Update deprecations
This commit is contained in:
Guy Sartorelli 2022-10-25 12:26:00 +13:00 committed by GitHub
commit 276c60c75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
namespace SilverStripe\BehatExtension\Context; namespace SilverStripe\BehatExtension\Context;
use SilverStripe\Dev\Deprecation;
use Exception; use Exception;
use InvalidArgumentException; use InvalidArgumentException;
use Behat\Behat\Context\Context; use Behat\Behat\Context\Context;
@ -624,10 +625,11 @@ JS;
* @param string $path * @param string $path
* @return Call\Given * @return Call\Given
* *
* @deprecated 4.5..5.0 - use iAttachTheFileToTheField() instead * @deprecated 4.5.0 Use iAttachTheFileToTheField() instead
*/ */
public function iAttachTheFileTo($field, $path) public function iAttachTheFileTo($field, $path)
{ {
Deprecation::notice('4.5.0', 'Use iAttachTheFileToTheField() instead');
// Remove wrapped button styling to make input field accessible to Selenium // Remove wrapped button styling to make input field accessible to Selenium
$js = <<<JS $js = <<<JS
let input = jQuery('[name="$field"]'); let input = jQuery('[name="$field"]');