Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Commit 85f1d22

Browse files
Closes #446
1 parent cfe6d7f commit 85f1d22

20 files changed

+136
-136
lines changed

src/6.0/en/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ Tests: 1, Assertions: 1, Failures: 1.</screen>
679679
<indexterm><primary>PHP Error</primary></indexterm>
680680
<indexterm><primary>PHP Notice</primary></indexterm>
681681
<indexterm><primary>PHP Warning</primary></indexterm>
682-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
682+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
683683

684684
By default, PHPUnit converts PHP errors, warnings, and notices that are
685685
triggered during the execution of a test to an exception. Using these
@@ -704,7 +704,7 @@ use PHPUnit\Framework\TestCase;
704704
class ExpectedErrorTest extends TestCase
705705
{
706706
/**
707-
* @expectedException PHPUnit_Framework_Error
707+
* @expectedException PHPUnit\Framework\Error
708708
*/
709709
public function testFailingInclude()
710710
{
@@ -723,11 +723,11 @@ OK (1 test, 1 assertion)</screen>
723723
</example>
724724

725725
<para>
726-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
727-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
726+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
727+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
728728

729-
<literal>PHPUnit_Framework_Error_Notice</literal> and
730-
<literal>PHPUnit_Framework_Error_Warning</literal> represent PHP notices
729+
<literal>PHPUnit\Framework\Error\Notice</literal> and
730+
<literal>PHPUnit\Framework\Error\Warning</literal> represent PHP notices
731731
and warnings, respectively.
732732
</para>
733733

@@ -746,7 +746,7 @@ OK (1 test, 1 assertion)</screen>
746746
<literal>fopen</literal> it can sometimes be useful to use error
747747
suppression while testing. This allows you to check the return values by
748748
suppressing notices that would lead to a phpunit
749-
<literal>PHPUnit_Framework_Error_Notice</literal>.
749+
<literal>PHPUnit\Framework\Error\Notice</literal>.
750750
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
751751

752752
<title>Testing return values of code that uses PHP Errors</title>

src/6.0/fr/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ class ExceptionTest extends PHPUnit_Framework_TestCase {
607607
<indexterm><primary>Erreur PHP</primary></indexterm>
608608
<indexterm><primary>Remarque PHP</primary></indexterm>
609609
<indexterm><primary>Avertissement PHP</primary></indexterm>
610-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
610+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
611611

612612
Par défaut, PHPUnit convertit les erreurs, avertissements et remarques PHP
613613
qui sont émises lors de l'exécution d'un test en exception. En utilisant ces
@@ -622,7 +622,7 @@ class ExceptionTest extends PHPUnit_Framework_TestCase {
622622
class ExpectedErrorTest extends PHPUnit_Framework_TestCase
623623
{
624624
/**
625-
@expectedException PHPUnit_Framework_Error
625+
@expectedException PHPUnit\Framework\Error
626626
*/
627627
public function testEchecInclude()
628628
{
@@ -641,11 +641,11 @@ OK (1 test, 1 assertion)</screen>
641641
</example>
642642

643643
<para>
644-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
645-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
644+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
645+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
646646

647-
<literal>PHPUnit_Framework_Error_Notice</literal> et
648-
<literal>PHPUnit_Framework_Error_Warning</literal> représentent respectivement
647+
<literal>PHPUnit\Framework\Error\Notice</literal> et
648+
<literal>PHPUnit\Framework\Error\Warning</literal> représentent respectivement
649649
les remarques et les avertissements PHP.
650650
</para>
651651

@@ -664,7 +664,7 @@ OK (1 test, 1 assertion)</screen>
664664
comme <literal>fopen</literal>, il peut parfois être utile d'utiliser la
665665
suppression d'erreur lors du test. Ceci permet de contrôler les valeurs de retour
666666
en supprimant les remarques qui auraient conduit à une
667-
<literal>PHPUnit_Framework_Error_Notice</literal> de phpunit.
667+
<literal>PHPUnit\Framework\Error\Notice</literal> de phpunit.
668668
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
669669

670670
<title>Tester des valeurs de retour d'un code source qui utilise des erreurs PHP</title>

src/6.0/ja/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ Tests: 1, Assertions: 1, Failures: 1.</screen>
697697
<indexterm><primary>PHP Error</primary></indexterm>
698698
<indexterm><primary>PHP Notice</primary></indexterm>
699699
<indexterm><primary>PHP Warning</primary></indexterm>
700-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
700+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
701701

702702
デフォルトでは、PHPUnit はテストの実行中に発生した PHP のエラーや警告そして notice
703703
を例外に変換します。これらの例外を用いて、たとえば
@@ -722,7 +722,7 @@ use PHPUnit\Framework\TestCase;
722722
class ExpectedErrorTest extends TestCase
723723
{
724724
/**
725-
* @expectedException PHPUnit_Framework_Error
725+
* @expectedException PHPUnit\Framework\Error
726726
*/
727727
public function testFailingInclude()
728728
{
@@ -741,11 +741,11 @@ OK (1 test, 1 assertion)</screen>
741741
</example>
742742

743743
<para>
744-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
745-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
744+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
745+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
746746

747-
<literal>PHPUnit_Framework_Error_Notice</literal> および
748-
<literal>PHPUnit_Framework_Error_Warning</literal> は、
747+
<literal>PHPUnit\Framework\Error\Notice</literal> および
748+
<literal>PHPUnit\Framework\Error\Warning</literal> は、
749749
それぞれ PHP の notice と警告に対応します。
750750
</para>
751751

@@ -765,7 +765,7 @@ OK (1 test, 1 assertion)</screen>
765765
エラーを引き起こすような PHP の関数、たとえば <literal>fopen</literal>
766766
などに依存するテストを行うときには、テスト中にエラーを抑制できれば便利なことがあります。
767767
そうすれば、notice のせいで
768-
<literal>PHPUnit_Framework_Error_Notice</literal>
768+
<literal>PHPUnit\Framework\Error\Notice</literal>
769769
が出てしまうことなく、返り値だけをチェックできるようになります。
770770
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
771771

src/6.0/pt_br/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ class ExceptionTest extends PHPUnit_Framework_TestCase {
763763
<indexterm><primary>PHP Error</primary></indexterm>
764764
<indexterm><primary>PHP Notice</primary></indexterm>
765765
<indexterm><primary>PHP Warning</primary></indexterm>
766-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
766+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
767767

768768
Por padrão, o PHPUnit converte os erros, avisos e notificações do PHP que são
769769
disparados durante a execução de um teste para uma exceção. Usando essas
@@ -786,7 +786,7 @@ class ExceptionTest extends PHPUnit_Framework_TestCase {
786786
class ExpectedErrorTest extends PHPUnit_Framework_TestCase
787787
{
788788
/**
789-
* @expectedException PHPUnit_Framework_Error
789+
* @expectedException PHPUnit\Framework\Error
790790
*/
791791
public function testFailingInclude()
792792
{
@@ -805,11 +805,11 @@ OK (1 test, 1 assertion)</screen>
805805
</example>
806806

807807
<para>
808-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
809-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
808+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
809+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
810810

811-
<literal>PHPUnit_Framework_Error_Notice</literal> e
812-
<literal>PHPUnit_Framework_Error_Warning</literal> representam notificações
811+
<literal>PHPUnit\Framework\Error\Notice</literal> e
812+
<literal>PHPUnit\Framework\Error\Warning</literal> representam notificações
813813
e avisos do PHP, respectivamente.
814814
</para>
815815

@@ -828,7 +828,7 @@ OK (1 test, 1 assertion)</screen>
828828
<literal>fopen</literal> pode ser útil algumas vezes usar a supressão de
829829
erros enquanto testa. Isso permite a você verificar os valores retornados por
830830
suprimir notificações que levariam a uma
831-
<literal>PHPUnit_Framework_Error_Notice</literal> phpunit.
831+
<literal>PHPUnit\Framework\Error\Notice</literal> phpunit.
832832
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
833833

834834
<title>Testando valores de retorno de código que utiliza PHP Errors</title>

src/6.0/zh_cn/writing-tests-for-phpunit.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ Tests: 1, Assertions: 1, Failures: 1.</screen>
569569
<indexterm><primary>PHP Error (PHP 错误)</primary></indexterm>
570570
<indexterm><primary>PHP Notice (PHP 通知)</primary></indexterm>
571571
<indexterm><primary>PHP Warning (PHP 警告)</primary></indexterm>
572-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>默认情况下,PHPUnit 将测试在执行中触发的 PHP 错误、警告、通知都转换为异常。利用这些异常,就可以,比如说,预期测试将触发 PHP 错误,如<xref linkend="writing-tests-for-phpunit.exceptions.examples.ErrorTest.php"/>所示。</para>
572+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>默认情况下,PHPUnit 将测试在执行中触发的 PHP 错误、警告、通知都转换为异常。利用这些异常,就可以,比如说,预期测试将触发 PHP 错误,如<xref linkend="writing-tests-for-phpunit.exceptions.examples.ErrorTest.php"/>所示。</para>
573573

574574
<note>
575575
<para>PHP 的 <literal>error_reporting</literal> 运行时配置会对 PHPUnit 将哪些错误转换为异常有所限制。如果在这个特性上碰到问题,请确认 PHP 的配置中没有抑制想要测试的错误类型。</para>
@@ -583,7 +583,7 @@ use PHPUnit\Framework\TestCase;
583583
class ExpectedErrorTest extends TestCase
584584
{
585585
/**
586-
* @expectedException PHPUnit_Framework_Error
586+
* @expectedException PHPUnit\Framework\Error
587587
*/
588588
public function testFailingInclude()
589589
{
@@ -602,16 +602,16 @@ OK (1 test, 1 assertion)</screen>
602602
</example>
603603

604604
<para>
605-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
606-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
605+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
606+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
607607

608-
<literal>PHPUnit_Framework_Error_Notice</literal> 和 <literal>PHPUnit_Framework_Error_Warning</literal> 分别代表 PHP 通知与 PHP 警告。</para>
608+
<literal>PHPUnit\Framework\Error\Notice</literal> 和 <literal>PHPUnit\Framework\Error\Warning</literal> 分别代表 PHP 通知与 PHP 警告。</para>
609609

610610
<note>
611611
<para>对异常进行测试是越明确越好的。对太笼统的类进行测试有可能导致不良副作用。因此,不再允许用 <literal>@expectedException</literal> 或 <literal>setExpectedException()</literal> 对 <literal>Exception</literal> 类进行测试。</para>
612612
</note>
613613

614-
<para>如果测试依靠会触发错误的 PHP 函数,例如 <literal>fopen</literal> ,有时候在测试中使用错误抑制符会很有用。通过抑制住错误通知,就能对返回值进行检查,否则错误通知将会导致抛出 <literal>PHPUnit_Framework_Error_Notice</literal>。<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
614+
<para>如果测试依靠会触发错误的 PHP 函数,例如 <literal>fopen</literal> ,有时候在测试中使用错误抑制符会很有用。通过抑制住错误通知,就能对返回值进行检查,否则错误通知将会导致抛出 <literal>PHPUnit\Framework\Error\Notice</literal>。<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
615615

616616
<title>对会引发PHP 错误的代码的返回值进行测试</title>
617617
<programlisting><![CDATA[<?php

src/6.1/en/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ Tests: 1, Assertions: 1, Failures: 1.</screen>
679679
<indexterm><primary>PHP Error</primary></indexterm>
680680
<indexterm><primary>PHP Notice</primary></indexterm>
681681
<indexterm><primary>PHP Warning</primary></indexterm>
682-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
682+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
683683

684684
By default, PHPUnit converts PHP errors, warnings, and notices that are
685685
triggered during the execution of a test to an exception. Using these
@@ -704,7 +704,7 @@ use PHPUnit\Framework\TestCase;
704704
class ExpectedErrorTest extends TestCase
705705
{
706706
/**
707-
* @expectedException PHPUnit_Framework_Error
707+
* @expectedException PHPUnit\Framework\Error
708708
*/
709709
public function testFailingInclude()
710710
{
@@ -723,11 +723,11 @@ OK (1 test, 1 assertion)</screen>
723723
</example>
724724

725725
<para>
726-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
727-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
726+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
727+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
728728

729-
<literal>PHPUnit_Framework_Error_Notice</literal> and
730-
<literal>PHPUnit_Framework_Error_Warning</literal> represent PHP notices
729+
<literal>PHPUnit\Framework\Error\Notice</literal> and
730+
<literal>PHPUnit\Framework\Error\Warning</literal> represent PHP notices
731731
and warnings, respectively.
732732
</para>
733733

@@ -746,7 +746,7 @@ OK (1 test, 1 assertion)</screen>
746746
<literal>fopen</literal> it can sometimes be useful to use error
747747
suppression while testing. This allows you to check the return values by
748748
suppressing notices that would lead to a phpunit
749-
<literal>PHPUnit_Framework_Error_Notice</literal>.
749+
<literal>PHPUnit\Framework\Error\Notice</literal>.
750750
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
751751

752752
<title>Testing return values of code that uses PHP Errors</title>

src/6.1/fr/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ class ExceptionTest extends PHPUnit_Framework_TestCase {
607607
<indexterm><primary>Erreur PHP</primary></indexterm>
608608
<indexterm><primary>Remarque PHP</primary></indexterm>
609609
<indexterm><primary>Avertissement PHP</primary></indexterm>
610-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
610+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
611611

612612
Par défaut, PHPUnit convertit les erreurs, avertissements et remarques PHP
613613
qui sont émises lors de l'exécution d'un test en exception. En utilisant ces
@@ -622,7 +622,7 @@ class ExceptionTest extends PHPUnit_Framework_TestCase {
622622
class ExpectedErrorTest extends PHPUnit_Framework_TestCase
623623
{
624624
/**
625-
@expectedException PHPUnit_Framework_Error
625+
@expectedException PHPUnit\Framework\Error
626626
*/
627627
public function testEchecInclude()
628628
{
@@ -641,11 +641,11 @@ OK (1 test, 1 assertion)</screen>
641641
</example>
642642

643643
<para>
644-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
645-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
644+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
645+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
646646

647-
<literal>PHPUnit_Framework_Error_Notice</literal> et
648-
<literal>PHPUnit_Framework_Error_Warning</literal> représentent respectivement
647+
<literal>PHPUnit\Framework\Error\Notice</literal> et
648+
<literal>PHPUnit\Framework\Error\Warning</literal> représentent respectivement
649649
les remarques et les avertissements PHP.
650650
</para>
651651

@@ -664,7 +664,7 @@ OK (1 test, 1 assertion)</screen>
664664
comme <literal>fopen</literal>, il peut parfois être utile d'utiliser la
665665
suppression d'erreur lors du test. Ceci permet de contrôler les valeurs de retour
666666
en supprimant les remarques qui auraient conduit à une
667-
<literal>PHPUnit_Framework_Error_Notice</literal> de phpunit.
667+
<literal>PHPUnit\Framework\Error\Notice</literal> de phpunit.
668668
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
669669

670670
<title>Tester des valeurs de retour d'un code source qui utilise des erreurs PHP</title>

src/6.1/ja/writing-tests-for-phpunit.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ Tests: 1, Assertions: 1, Failures: 1.</screen>
697697
<indexterm><primary>PHP Error</primary></indexterm>
698698
<indexterm><primary>PHP Notice</primary></indexterm>
699699
<indexterm><primary>PHP Warning</primary></indexterm>
700-
<indexterm><primary>PHPUnit_Framework_Error</primary></indexterm>
700+
<indexterm><primary>PHPUnit\Framework\Error</primary></indexterm>
701701

702702
デフォルトでは、PHPUnit はテストの実行中に発生した PHP のエラーや警告そして notice
703703
を例外に変換します。これらの例外を用いて、たとえば
@@ -722,7 +722,7 @@ use PHPUnit\Framework\TestCase;
722722
class ExpectedErrorTest extends TestCase
723723
{
724724
/**
725-
* @expectedException PHPUnit_Framework_Error
725+
* @expectedException PHPUnit\Framework\Error
726726
*/
727727
public function testFailingInclude()
728728
{
@@ -741,11 +741,11 @@ OK (1 test, 1 assertion)</screen>
741741
</example>
742742

743743
<para>
744-
<indexterm><primary>PHPUnit_Framework_Error_Notice</primary></indexterm>
745-
<indexterm><primary>PHPUnit_Framework_Error_Warning</primary></indexterm>
744+
<indexterm><primary>PHPUnit\Framework\Error\Notice</primary></indexterm>
745+
<indexterm><primary>PHPUnit\Framework\Error\Warning</primary></indexterm>
746746

747-
<literal>PHPUnit_Framework_Error_Notice</literal> および
748-
<literal>PHPUnit_Framework_Error_Warning</literal> は、
747+
<literal>PHPUnit\Framework\Error\Notice</literal> および
748+
<literal>PHPUnit\Framework\Error\Warning</literal> は、
749749
それぞれ PHP の notice と警告に対応します。
750750
</para>
751751

@@ -765,7 +765,7 @@ OK (1 test, 1 assertion)</screen>
765765
エラーを引き起こすような PHP の関数、たとえば <literal>fopen</literal>
766766
などに依存するテストを行うときには、テスト中にエラーを抑制できれば便利なことがあります。
767767
そうすれば、notice のせいで
768-
<literal>PHPUnit_Framework_Error_Notice</literal>
768+
<literal>PHPUnit\Framework\Error\Notice</literal>
769769
が出てしまうことなく、返り値だけをチェックできるようになります。
770770
<example id="writing-tests-for-phpunit.exceptions.examples.TriggerErrorReturnValue.php">
771771

0 commit comments

Comments
 (0)