From 97bccf76061b1e47a2af0d824a5c8103d3fbd29f Mon Sep 17 00:00:00 2001 From: magenoxx Date: Mon, 26 Mar 2012 10:35:16 +0400 Subject: [PATCH] Phantasmal Image test. --- .../test/cards/copy/PhantasmalImageTest.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java new file mode 100644 index 00000000000..b18e87f9e77 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java @@ -0,0 +1,34 @@ +package org.mage.test.cards.copy; + +import mage.Constants; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * @author noxx + * + * Card: You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it." + */ +public class PhantasmalImageTest extends CardTestPlayerBase { + + /** + * When Oblivion Ring enters the battlefield, exile another target nonland permanent. + */ + @Test + public void testCopyCreature() { + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2); + addCard(Constants.Zone.HAND, playerA, "Phantasmal Image"); + addCard(Constants.Zone.BATTLEFIELD, playerB, "Craw Wurm"); + + castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Phantasmal Image"); + + setStopAt(2, Constants.PhaseStep.END_TURN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + assertPermanentCount(playerA, "Phantasmal Image", 1); + assertPermanentCount(playerB, "Craw Wurm", 1); + } + +}